Merge remote-tracking branch 'remotes/origin/test'

This commit is contained in:
joylink_cuiweidong 2020-12-11 20:18:58 +08:00
commit c3fc4a1797
148 changed files with 6325 additions and 3358 deletions

View File

@ -152,6 +152,23 @@ export function deleteRoutingData(routingId) {
});
}
/** 保存用户配置 (新版)*/
export function addRunplanConfig(mapId, data) {
return request({
url: `/api/runPlan/userData/${mapId}/config`,
method: 'post',
data: data
});
}
/** 获取用户配置(新版)*/
export function getRunplanConfig(mapId) {
return request({
url: `/api/runPlan/userData/${mapId}/config`,
method: 'get'
});
}
/** 获取交路详情(新版)*/
export function getRoutingData(routingId) {
return request({

View File

@ -79,3 +79,10 @@ export function gotPermissionUserList(params) {
params: params
});
}
/** 一键领取地图权限 */
export function getPermissionQuickly(mapId, count) {
return request({
url: `/api/userPermission/${mapId}/getPermissions?count=${count}`,
method: 'post'
});
}

View File

@ -147,10 +147,19 @@ export function checkServiceNumberExist({ planId, serviceNumber }) {
});
}
/** 查询交路列表*/
export function getRoutingList(planId) {
// /** 查询交路列表*/
// export function getRoutingList(planId) {
// return request({
// url: `/api/runPlan/draft/${planId}/routingList`,
// method: 'get'
// });
// }
/** 查询用户交路数据 (新版)*/
export function listUserRoutingData(mapId) {
return request({
url: `/api/runPlan/draft/${planId}/routingList`,
// url: `/api/mapBuild/${mapId}/routingData`,
url: `/api/runPlan/userData/${mapId}/routing`,
method: 'get'
});
}
@ -233,10 +242,19 @@ export function updatePlanTrip(data) {
});
}
/** 根据车次号查询交路*/
/** 根据车次号查询交路 */
export function getRoutingBySDTNumber(params) {
// 旧版
// return request({
// url: `/api/runPlan/draft/${params.planId}/routing`,
// method: 'get',
// params: {
// SDTNumber: params.SDTNumber
// }
// });
// 新版
return request({
url: `/api/runPlan/draft/${params.planId}/routing`,
url: `/api/runPlan/draft/${params.planId}/userRouting`,
method: 'get',
params: {
SDTNumber: params.SDTNumber
@ -252,6 +270,15 @@ export function updateServiceNumber(planId, serviceNumber, newServiceNumber) {
});
}
/** 生成计划(新版)*/
export function generatePlanTrain(planId, data) {
return request({
url: `/api/runPlan/draft/${planId}/service/generate`,
method: 'post',
data
});
}
/** 修改任务车次号*/
export function updateTripNumber(planId, SDTNumber, tripNumber) {
return request({

Binary file not shown.

After

Width:  |  Height:  |  Size: 391 KiB

View File

@ -1,5 +1,5 @@
<template>
<el-form ref="form" :rules="rules" :model="formModel" :inline="inline" :label-width="form.labelWidth" @submit.native.prevent>
<el-form ref="form" :rules="rules" :model="formModel" :inline="inline" :label-width="form.labelWidth" :size="form.size?form.size:'medium'" @submit.native.prevent>
<template v-for="item in form.items">
<template v-if="checkFieldType(item, 'text')">
<el-form-item :key="item.prop" :prop="item.prop" :label="item.label" :required="item.required">
@ -199,6 +199,7 @@
v-model="formModel[item.prop]"
filterable
:placeholder="item.placeholder"
:no-data-text="item.noDataText?item.noDataText:'无数据'"
:disabled="item.disabled"
@change="item.onChange"
>
@ -215,6 +216,7 @@
<el-select
v-model="formModel[item.prop]"
filterable
:no-data-text="item.noDataText?item.noDataText:'无数据'"
:clearable="item.clearable"
:placeholder="item.placeholder"
:disabled="item.disabled"

View File

@ -168,7 +168,8 @@ export default {
automaticSignalUpdateSucceeded: 'Automatic signal update successful!',
automaticSignalUpdateFailed: 'Automatic signal update failed',
stationName: 'The station name:',
stationName: 'The station name',
stationNameColon: 'The station name:',
property: 'attribute',
counterCoding: 'Counter coding:',

View File

@ -81,6 +81,7 @@ export default {
modifySuccess: 'Modify Success',
modifyFailed: 'Modify Failed',
modifyRunLevel: 'Modify run level',
modifyStopTime:'Modify stop time',
startStationTips: 'Start station departure time unchanged',
endStationTips: 'End station departure time unchanged',
@ -142,7 +143,7 @@ export default {
afterTheTrainHasBackInterval: 'After the train has a back interval',
secondsCanBeRunnedByTrain: 'seconds can be runned by train',
defaultStopTime: 'Default stop time:',
defaultRunLevel: 'Default run level:',
defaultRunLevel: 'Run level:',
stopTime: 'Stop time',
runLevel: 'Run level',
platform: 'Platform',
@ -236,5 +237,6 @@ export default {
modifyName: 'Modify name',
applyRelease:'Apply for release',
preview:'Preview',
revoke:'Revoke'
revoke:'Revoke',
gerneratePlan:'Gernerate plan'
};

View File

@ -156,7 +156,8 @@ export default {
interconnected: '联锁控名称',
buttonType: '所属类型',
stationName: '车站名称:',
stationNameColon: '车站名称:',
stationName: '车站名称',
property: '属性',
counterCoding: '计数器编码:',

View File

@ -39,7 +39,7 @@ export default {
continuationPlan: '延续计划',
firstTrain: '首班车',
serialNumber: '序列号:',
defaultRunLevel: '缺省运行等级:',
defaultRunLevel: '运行等级:',
startTime: '开始时间',
selectTime: '选择时间',
inStock: '入库',
@ -81,6 +81,7 @@ export default {
modifySuccess: '修改成功!',
modifyFailed: '修改失败',
modifyRunLevel: '修改运行等级',
modifyStopTime:'修改停站时间',
startStationTips: '起始站发车时间不变',
endStationTips: '终到站到达时间不变',
@ -239,5 +240,6 @@ export default {
modifyName: '修改名称',
applyRelease:'申请发布',
preview:'预览',
revoke:'撤回'
revoke:'撤回',
gerneratePlan:'生成计划'
};

View File

@ -1,179 +0,0 @@
//import request from '@/utils/request';
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"
};
if(data.mapdata.sectionlist.sections== undefined){
return postmap;
}
if(data == undefined){
return postmap;
}else{
//资源
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);
}
postmap.assets = JSON.stringify(assets);
//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 = [];
for(let i=0;i<data.mapdata.sectionlist.sections.datalist.length;i++){
let section = {
uuid:data.mapdata.sectionlist.sections.modellist[i].uuid,
code:data.mapdata.sectionlist.sections.modellist[i].code,
name:data.mapdata.sectionlist.sections.modellist[i].name,
lengthfact:data.mapdata.sectionlist.sections.modellist[i].lengthfact,
isStandTrack:data.mapdata.sectionlist.sections.modellist[i].isStandTrack,
relStandCode:data.mapdata.sectionlist.sections.datalist[i].relStandCode,
linkCode:data.mapdata.sectionlist.sections.datalist[i].linkCode,
rightlist:data.mapdata.sectionlist.sections.modellist[i].rightlist,
leftlist:data.mapdata.sectionlist.sections.modellist[i].leftlist,
rightpoint:data.mapdata.sectionlist.sections.modellist[i].rightpoint,
leftpoint:data.mapdata.sectionlist.sections.modellist[i].leftpoint,
rail:data.mapdata.sectionlist.sections.modellist[i].rail,
position:data.mapdata.sectionlist.sections.modellist[i].position,
rotation:data.mapdata.sectionlist.sections.modellist[i].rotation,
scale:data.mapdata.sectionlist.sections.modellist[i].scale
}
// testmesh1.position.z = link.position.z;
sections.push(section);
}
console.log(links);
let arrray = {
link:links,
section:sections,
};
postmap.sections = JSON.stringify(arrray);
//道岔
let switchs = [];
for(let i=0;i<data.mapdata.sectionlist.switchs.modellist.length;i++){
let switcha = {
uuid:data.mapdata.sectionlist.switchs.modellist[i].uuid,
code:data.mapdata.sectionlist.switchs.datalist[i].code,
name:data.mapdata.sectionlist.switchs.datalist[i].name,
alink:data.mapdata.sectionlist.switchs.datalist[i].alink,
blink:data.mapdata.sectionlist.switchs.datalist[i].blink,
clink:data.mapdata.sectionlist.switchs.datalist[i].clink,
paname:data.mapdata.sectionlist.switchs.datalist[i].paname,
pbname:data.mapdata.sectionlist.switchs.datalist[i].pbname,
pcname:data.mapdata.sectionlist.switchs.datalist[i].pcname,
pa:data.mapdata.sectionlist.switchs.datalist[i].pa,
pb:data.mapdata.sectionlist.switchs.datalist[i].pb,
pc:data.mapdata.sectionlist.switchs.datalist[i].pc,
position:data.mapdata.sectionlist.switchs.modellist[i].position,
rotation:data.mapdata.sectionlist.switchs.modellist[i].rotation,
scale:data.mapdata.sectionlist.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,
position:data.mapdata.signallist.list[i].mesh.position,
rotation:data.mapdata.signallist.list[i].mesh.rotation,
scale:data.mapdata.signallist.list[i].mesh.scale,
virtual:data.mapdata.signallist.list[i].mesh.virtual
}
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,
direction1:{
name:data.mapdata.stationstandlist.list[i].direction1.name,
code:null
},
direction2:{
name:data.mapdata.stationstandlist.list[i].direction2.name,
code:null
}
}
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

@ -30,7 +30,6 @@ export function initDataSave(data) {
//section隧道
let sections = [];
// console.log(data.mapdata.sectionlist.sections.datalist);
for(let i in data.mapdata.sectionlist.sections.datalist){
let section = {
@ -48,7 +47,6 @@ export function initDataSave(data) {
scale:null,
}
if(data.mapdata.sectionlist.sections.datalist[i].mesh){
console.log(data.mapdata.sectionlist.sections.datalist[i].mesh.railpoint);
let nowmesh = data.mapdata.sectionlist.sectiongroup.getObjectByProperty("code",section.code);
section.railpoint = nowmesh.railpoint;
section.lengthFact = data.mapdata.sectionlist.sections.datalist[i].mesh.lengthFact;
@ -58,7 +56,6 @@ export function initDataSave(data) {
sections.push(section);
}
// console.log(nowmesh.railpoint);
// if(data.mapdata.sectionlist.sections.datalist[i].rsection){
// section.rsection = data.mapdata.sectionlist.sections.datalist[i].rsection;
// }
@ -118,7 +115,6 @@ export function initDataSave(data) {
let stands = [];
for(let i=0;i<data.mapdata.stationstandlist.list.length;i++){
console.log(data.mapdata.stationstandlist.list[i]);
let station = {
// uuid:data.mapdata.stationstandlist.list[i].uuid,
code:data.mapdata.stationstandlist.list[i].code,
@ -138,7 +134,6 @@ export function initDataSave(data) {
// code:data.mapdata.stationstandlist.list[i].direction2.code
// }
}
console.log(station);
stands.push(station);
}
postmap.stands = JSON.stringify(stands);

View File

@ -1,10 +0,0 @@
import request from '@/utils/request';
/** 获取路径单元列表*/
export function getmodels(data) {
return request({
url: 'http://192.168.3.23:1337/model_load',
method: 'get',
params: data
});
}

View File

@ -10,7 +10,6 @@ import {SwitchList} from '@/jlmap3d/edit/testEditorModel/SwitchList.js';
import {RailList} from '@/jlmap3d/edit/testEditorModel/RailList.js';
import axios from 'axios';
import {getmodels} from '@/jlmap3d/edit/connect/getmodels';
import { Loading } from 'element-ui';
// import {SwitchModel} from '@/jlmap3d/model/SwitchModel.js';
@ -100,12 +99,11 @@ export function jl3dEditorLoader(mapid,scope){
function loadData(mapid,netdata){
// console.log(netdata)
getMapDetail(mapid).then(data => {
jlmap3ddata.id = netdata.id;
jlmap3ddata.mapId = mapid;
let mapdata = data.data;
// console.log(netdata);
// //初始化站台
jlmap3ddata.stationstandlist = new StationStandList();
//初始化轨道和道岔 暂时
@ -122,7 +120,7 @@ export function jl3dEditorLoader(mapid,scope){
let signaldata = JSON.parse(netdata.signals);
let standsdata = JSON.parse(netdata.stands);
jlmap3dasset = JSON.parse(netdata.assets);
console.log(netdata);
if(jlmap3dasset.sceneAssetList == undefined){
// loadEditAllAsset(jlmap3dasset);
@ -155,9 +153,8 @@ export function jl3dEditorLoader(mapid,scope){
assetloader.setModelListOver(jlmap3dasset.sceneAssetList,5);
assetloader.assetPromiseOver(scene)
.then(function(data){
console.log(assetloader.modellist);
// return jlmap3ddata.stationstandlist.initpromise(jlmap3ddata,mapdata.stationList,mapdata.stationStandList,scene,assetloader);
return jlmap3ddata.stationstandlist.loadpromise(jlmap3ddata,standsdata,mapdata.stationStandList,scene,assetloader);
return jlmap3ddata.stationstandlist.loadpromise(jlmap3ddata,standsdata,mapdata,scene,assetloader);
})
.then(function(data){
//console.log(data);

View File

@ -87,11 +87,27 @@ export function StationStandList() {
resolve("loadedstation");
});
}
this.loadpromise = function(jlmap3ddata,standsdata,jlmapstanddata,scene,assetloader){
this.loadpromise = function(jlmap3ddata,standsdata,jlmapdata,scene,assetloader){
return new Promise(function(resolve, reject){
// console.log(jlmap3ddata);
let jlmapstationdata = jlmapdata.stationList;
let jlmapstanddata = jlmapdata.stationStandList;
// jlmapstationdata.splice(0,1);
console.log(standsdata);
console.log(jlmapstationdata);
for(let i=0;i<jlmapstationdata.length;i++){
if(jlmapstationdata[i].visible == false || jlmapstationdata[i].subheadDisplay == false){
jlmapstationdata.splice(i,1);
i--;
}else{
standsdata[i].code = jlmapstationdata[i].code;
standsdata[i].name = jlmapstationdata[i].name;
}
// console.log(jlmapstationdata[i].subheadDisplay);
}
// console.log(jlmapstationdata);
console.log(standsdata);
// console.log(jlmapstanddata);
let stations = jlmap3ddata.stationstandlist.list;
let num;
let num2;

View File

@ -206,29 +206,15 @@ export function Jl3ddeviceNew(dom,group,token,skinCode) {
});
}
}
let changeelement = document.getElementById('jl3d');
window.addEventListener('resize', () =>
onresize()
, false)
let onresize = function () {
window.onresize = function () {
// if(scope.windowstatus){
// changeelement.style.width = '50%';
// changeelement.style.height = '50%';
// changeelement.style.top = '25%';
// scope.windowstatus = false;
// scope.updatewindowstatus('0');
// }else{
scope.camera.aspect = scope.dom.offsetWidth / scope.dom.offsetHeight;
scope.camera.aspect = changeelement.offsetWidth / changeelement.offsetHeight;
scope.camera.updateProjectionMatrix();
scope.renderer.setSize(scope.dom.offsetWidth, scope.dom.offsetHeight);
if(scope.windowstatus == "0"){
let changeelement = document.getElementById('jl3d');
changeelement.style.width = '100%';
changeelement.style.height = '100%';
changeelement.style.top = '0';
scope.camera.aspect = window.innerWidth / scope.dom.offsetHeight;
scope.camera.updateProjectionMatrix();
scope.renderer.setSize(window.innerWidth, scope.dom.offsetHeight);
}
scope.renderer.setSize(changeelement.offsetWidth, changeelement.offsetHeight);
}

View File

@ -53,6 +53,7 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
// console.log(data);
if(data.type == "Train_Position"){
nowTrainRun(data.body);
return;
}

View File

@ -51,8 +51,9 @@ export function TrainConnect(trafficTrain,deviceaction,toptrain,routegroup,passe
}
if(data.type == "BeAbout2Arrive_3D"){
// console.log(data);
if(toptrain.nowcode == data.body.groupNumber){
// console.log(data);
trafficTrain.arriveVoice(data.body.stationCode);
}
}
@ -73,6 +74,19 @@ export function TrainConnect(trafficTrain,deviceaction,toptrain,routegroup,passe
// jl3d.updateNowLeaveData("down",data.body.out);
// }
}
if(data.type == "TRAIN_PIS"){
for(let i=0;i<data.body.length;i++){
trafficTrain.trainList[data.body[i].code].endStation = data.body[i].endStation;
trafficTrain.trainList[data.body[i].code].nextStation = data.body[i].nextStation;
if(toptrain.nowcode == data.body[i].code){
trafficTrain.updatePisTrain(trafficTrain.trainList[data.body[i].code]);
}
}
}
if(data.type == "TRAIN_PFI_NUM"){
trafficTrain.trainList = [];

View File

@ -164,7 +164,6 @@ export function Jl3dTrafficPlan(dom,skinCode,routegroup,viewMap,initCode) {
scene.add(topWaitPassers);
scene.add(downWaitPassers);
scene.add(outStationPassers);
passerStation.initStationList(netdata.data.stationList,netdata.data.stationStandList,netdata.data.psdList);
socktest = new PassflowConnect(deviceaction,passerTrain.toptrain,passerTrain.downtrain,routegroup,passerStation,passerAi,scope);
@ -173,7 +172,6 @@ export function Jl3dTrafficPlan(dom,skinCode,routegroup,viewMap,initCode) {
let checkobject = setInterval(function(){
clearInterval(checkobject);
//进站控制
startWorker();
passerWebWork.postMessage(["on"]);
@ -426,6 +424,7 @@ export function Jl3dTrafficPlan(dom,skinCode,routegroup,viewMap,initCode) {
passerRender.changeRenderMode(viewmode);
}
function getnum(num,pnum){
let re = [];
let base = Math.floor(num/pnum);

View File

@ -18,6 +18,10 @@ import { PasserTrain } from '@/jlmap3d/jl3dtrafficplan/model/passertrain.js';
import { PasserHuman } from '@/jlmap3d/jl3dtrafficplan/model/traintrunk/passertrunkhuman.js';
//cctv渲染器
import { PasserRender } from '@/jlmap3d/jl3dpassflow/passerrender/passerrender.js';
//pis
import { PisTexture } from '@/jlmap3d/jl3dtrafficplan/utils/trainpiscanvas.js';
//cctv行人ai
import { PasserAi } from '@/jlmap3d/jl3dpassflow/passerai/passerai.js';
//行人寻路相关工具
@ -133,7 +137,7 @@ export function Jl3dTrafficTrain(dom,skinCode,routegroup,viewMap,initCode) {
let stationlist = [];
let socktest = null;
let passerTrain = new PasserTrain();
let pisControl = new PisTexture();
this.modelmanager.loadpromise(Staticmodel, scope.mixers,"2").then(function (data) {
// console.log(data);
passerTrain.initTrain(scope.modelmanager.train.mesh,mixers,deviceaction,scene);
@ -149,7 +153,7 @@ export function Jl3dTrafficTrain(dom,skinCode,routegroup,viewMap,initCode) {
socktest = new TrainConnect(scope,deviceaction,passerTrain.toptrain,routegroup,passerAi);
pisControl.init(passerTrain.toptrain,netdata.data);
let checkobject = setInterval(function(){
store.dispatch('app/animationsClose');
@ -165,6 +169,7 @@ export function Jl3dTrafficTrain(dom,skinCode,routegroup,viewMap,initCode) {
// console.log(scope.trainList[initCode]);
if(scope.trainList[initCode]){
pisControl.startRender();
scope.updateNowTrainCode(initCode);
clearInterval(checkInitCode);
}
@ -320,38 +325,28 @@ export function Jl3dTrafficTrain(dom,skinCode,routegroup,viewMap,initCode) {
this.updateTrainData = function(newData){
// console.log(scope.trainList);
// if(scope.trainList.length > 0){
// for(let k in scope.trainList.length){
let k = newData.code;
if(scope.trainList[k]){
// console.log(newData);
// console.log(scope.trainList[k].num);
scope.trainList[k].num = scope.trainList[k].num + newData.in - newData.out;
scope.trainList[k].text = k+"(现有乘客"+scope.trainList[k].num+"人)";
if(passerTrain.toptrain.nowcode == newData.code){
scope.humanWaitIn = getnum(newData.in,6);
scope.humanWaitOut = getnum(newData.out,6);
// console.log(scope.humanWaitIn);
// console.log(scope.humanWaitOut);
// console.log(nowLeaveDoor);
// console.log("------------------");
passerHuman.initTrainRail(humanlist,scope.humanWaitIn,scope.humanWaitOut,nowLeaveDoor);
let trainDataList = getnum(scope.trainList[k].num,6);
// nowTrunk.code = newCode;
scope.nowTrunk.numList = trainDataList;
scope.trainList[k].text = k+"(现有乘客"+scope.trainList[k].num+"人)";
// scope.trainList[k].text = k+"(现有乘客"+scope.trainList[k].num+"人)";
updateTrainNum(trainDataList);
}
// i = scope.trainList.length;
}
// }
// }
}
this.updateNowTrainCode = function(newCode){
passerTrain.toptrain.nowcode = newCode;
scope.updatePisTrain(scope.trainList[newCode]);
scope.nowTrainCode = newCode;
let trunkNum = 0;
// console.log(scope.trainList);
@ -408,6 +403,15 @@ export function Jl3dTrafficTrain(dom,skinCode,routegroup,viewMap,initCode) {
this.switchviews = function(viewmode){
passerRender.changeRenderMode(viewmode);
}
//更新pis
this.updatePisTrain = function(pisTrain){
pisControl.updateParam(pisTrain);
}
//列车进站通知
this.arriveVoice = function(stationCode){
pisControl.arriveVoice(stationCode);
}
function getnum(num,pnum){
let re = [];

View File

@ -19,7 +19,7 @@ var Staticmodel = [
name: "列车",
deviceType: "train",
type: "cctvTrain",
url: BASE_ASSET_API + "/MODEL/2020-11-16/48-14909.FBX"
url: BASE_ASSET_API + "/MODEL/2020-12-08/493-62073.FBX"
},
{
id: "8",

View File

@ -168,9 +168,7 @@ export function PasserHuman() {
// console.log(inNum[scope.nowTrunk]);
let inPasser = getnum(inNum[scope.nowTrunk].num,3);
let outPasser = getnum(leaveNum[scope.nowTrunk].num,3);
// console.log(inPasser);
// console.log(outPasser);
// let outPassers = inNum[scope.nowTrunk].num;
let created = 0;
for(let i=0;i<outPasser.length;i++){
for(let j=0;j<outPasser[i];j++){
@ -187,7 +185,7 @@ export function PasserHuman() {
for(let j=0;j<inPasser[i];j++){
setTimeout(function(){
scope.createInPasser(humanlist,direct);
}, Math.random()*1000*i);
}, 2000+Math.random()*1000*j);
}
}

View File

@ -0,0 +1,224 @@
//静态资源文件路劲
import { LocalVoice } from '@/jlmap3d/utils/localvoice/localVoice.js';
import { JL3D_LOCAL_STATIC } from '@/api/jlmap3d/assets3d.js';
export function PisTexture(zone,finder) {
let scope = this;
this.stationNum = 0;
this.materialPis = null;
this.direct = 0;
this.index = null;
let voiceModel = new LocalVoice();
voiceModel.localVoiceInit();
let lightConfig = [
{x:46,y:100},
{x:67,y:100},
{x:88,y:100},
{x:109,y:100},
{x:130,y:100},
{x:151,y:100},
{x:172,y:100},
{x:193,y:100},
{x:214,y:100},
{x:235,y:100},
{x:256,y:100},
{x:277,y:100},
{x:298,y:100},
{x:319,y:100},
{x:340,y:100},
{x:361,y:100},
{x:382,y:100},
{x:403,y:100},
{x:424,y:100},
{x:445,y:100},
{x:466,y:100},
];
var textureTop = new Image();
textureTop.src = JL3D_LOCAL_STATIC+"/trafficplan/directtop.jpg";
var textureDown = new Image();
textureDown.src = JL3D_LOCAL_STATIC+"/trafficplan/directdown.jpg";
let psdVoiceStationList = [];
let stationIndexList = [];
this.init = function(trainModel,mapnetdata){
scope.materialPis = trainModel.children[0].getObjectByName("PIS").material;
let stationStandList = mapnetdata.stationStandList;
let psdList = mapnetdata.psdList;
let jlmapstationdata = mapnetdata.stationList;
for(let i=0;i<jlmapstationdata.length;i++){
if(jlmapstationdata[i].visible == false){
jlmapstationdata.splice(i,1);
i--;
}else {
stationIndexList[jlmapstationdata[i].code] = {
name:jlmapstationdata[i].name,
index:i,
};
}
}
// for(let i=0,leni=stationStandList.length;i<leni;i++){
// for(let j=0,lenj=psdList.length;j<lenj;j++){
// if(stationStandList[i].code == psdList[j].standCode){
// psdVoiceStationList[psdList[j].code] = {
// stationCode:stationStandList[i].stationCode,
// right:stationStandList[i].right,
// finlStationName:"",
// nowStationName:""
// }
// j = lenj;
// }
// }
// }
//
// let stationList = [];
// for(let i=0,leni=mapnetdata.stationList.length;i<leni;i++){
// if(mapnetdata.stationList[i].depot == false){
//
// stationList.push(mapnetdata.stationList[i]);
// }
// }
// // console.log(mapnetdata.stationList);
// for(let k in psdVoiceStationList){
// for(let i=0,leni=stationList.length;i<leni;i++){
// // console.log("---------------");
// // console.log("---------------");
// if(psdVoiceStationList[k].stationCode == stationList[i].code){
// psdVoiceStationList[k].nowStationName = stationList[i].name;
//
// if(psdVoiceStationList[k].right){
// psdVoiceStationList[k].finlStationName = stationList[leni-1].name;
// }else{
// psdVoiceStationList[k].finlStationName = stationList[0].name;
// }
// i = leni;
// }
// }
// }
}
this.startRender = function(){
setInterval(function(){
// var texture = getTextCanvasLight("xxx");
if(scope.index){
scope.updateTexture();
}
}, 1000);
}
this.arriveVoice = function(stationCode){
voiceModel.localVoicePlay("列车即将进站"+stationIndexList[stationCode].name);
}
this.updateParam = function(pisTrain){
if(stationIndexList[pisTrain.endStation].index>10){
scope.direct = true;
}else{
scope.direct = false;
}
scope.index = stationIndexList[pisTrain.nextStation].index;
}
this.updateTexture = function(){
// var texture = getTextCanvasLight(direct);
scope.materialPis.map.image = getLightTextCanvas(scope.direct,scope.index);
scope.materialPis.map.needsUpdate = true;
}
let lightNum = false;
let canvas = document.getElementById('canvastexture');
canvas.width = 512;
canvas.height = 128;
var ctx = canvas.getContext('2d');
function getLightTextCanvas(direct,index){
ctx.fillRect(0, 0,512,128);
ctx.font = "10px Verdana";
// ctx.fillStyle = '#ffffff';
ctx.textAlign = 'center';
ctx.textBaseline = 'middle';
ctx.clearRect(0,0,512,128);
if(direct == true){
ctx.drawImage(textureTop,0,0,512, 128);
}else{
ctx.drawImage(textureDown,0,0,512, 128);
}
for(let i=0;i<lightConfig.length;i++){
if(i < scope.index){
ctx.beginPath();
ctx.arc(lightConfig[i].x,lightConfig[i].y,3,0,Math.PI*2,false);
ctx.fillStyle="rgba(192,80,77,0.7)";
//半透明的红色rgba(192,80,77,0.7)
//rgba(39,246,205,0.7)
ctx.fill();
ctx.strokeStyle="rgba(192,80,77,1)";
//红色rgba(192,80,77,1)
//rgba(39,246,205,1)
ctx.stroke();
}
if(i == scope.index){
if(lightNum == false){
ctx.beginPath();
ctx.arc(lightConfig[i].x,lightConfig[i].y,3,0,Math.PI*2,false);
ctx.fillStyle="rgba(192,80,77,0.7)";
//半透明的红色rgba(192,80,77,0.7)
//rgba(39,246,205,0.7)
ctx.fill();
ctx.strokeStyle="rgba(192,80,77,1)";
//红色rgba(192,80,77,1)
//rgba(39,246,205,1)
ctx.stroke();
lightNum = true;
}else{
ctx.beginPath();
ctx.arc(lightConfig[i].x,lightConfig[i].y,3,0,Math.PI*2,false);
ctx.fillStyle="rgba(39,246,205,0.7)";
//半透明的红色rgba(192,80,77,0.7)
//rgba(39,246,205,0.7)
ctx.fill();
ctx.strokeStyle="rgba(39,246,205,1)";
//红色rgba(192,80,77,1)
//rgba(39,246,205,1)
ctx.stroke();
lightNum = false;
}
}
if(i > scope.index){
ctx.beginPath();
ctx.arc(lightConfig[i].x,lightConfig[i].y,3,0,Math.PI*2,false);
ctx.fillStyle="rgba(39,246,205,0.7)";
//半透明的红色rgba(192,80,77,0.7)
//rgba(39,246,205,0.7)
ctx.fill();
ctx.strokeStyle="rgba(39,246,205,1)";
//红色rgba(192,80,77,1)
//rgba(39,246,205,1)
ctx.stroke();
}
}
let data = ctx.getImageData(0, 0,512,128);
return data;
}
}

View File

@ -336,6 +336,26 @@ class SkinCode extends defaultStyle {
}
};
this[deviceType.StationTurnBack] = { // 站后折返
displayCondition: '01', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
lamp: {
fill: '#f1f1f1', // 填充色
radiusR: 7 // 控制灯大小
},
text: {
titleTextShow: false,
fontWeight: 580,
fontSize: 10,
distance: 10
},
rect: {
fill: 'rgba(0,0,0,0)',
stroke: '#fff',
lineWidth: 0,
padding: 6
}
};
this[deviceType.Station] = {
// 成都三号线车站元素 车站名称
elemnetType:['stationText'],

View File

@ -90,7 +90,7 @@ class SkinCode extends defaultStyle {
faultLockColor: '#81007F', // 区段故障锁定颜色
undefinedColor: '#0071C1', // 区段未定义颜色
protectionLockedColor: '#FFFFFF', // 保护区段锁闭
blockColor: '#d659d6', // 区段封锁颜色(淡紫色)
blockColor: '#FE0000', // 区段封锁颜色(淡紫色)
atcExcisionColor: '#A0522D', // 区段atc切除颜色
atsExcisionColor: '#A0522D', // 区段ats切除颜色
invalidColor: '#AC8F40', // 计轴故障颜色
@ -146,7 +146,7 @@ class SkinCode extends defaultStyle {
halfHeight: 8 // 区段分隔符高度的一半
},
block: {
blockGlint: true // 区段封锁闪烁显示
blockGlint: false // 区段封锁闪烁显示
},
trainPosition:{
display: true, // 列车实时位置显示
@ -395,9 +395,9 @@ class SkinCode extends defaultStyle {
designatedJumpStopColor: 'lightSkyBlue', // 站台指定列车跳停颜色
headFontSize: 10, // 站台首端字体大小
doorOpenColor:'#00FF00', // 车门开启状态颜色
stopColor: 'yellow', // 站台列车停站颜色
stopColor: '#0080C0', // 站台列车停站颜色
virtualColor: '#585858', // 虚拟站台颜色
lineWidth: 3 // 站台线宽
lineWidth: 6 // 站台线宽
},
// 站台紧急关闭
emergentRhombus:{
@ -414,8 +414,9 @@ class SkinCode extends defaultStyle {
position: 1, // 扣车标识在站台上显示方向
text: 'H', // 扣车显示内容
offset: { x: -8, y: 10 }, // 扣车偏移量
centerTrainColor: '#00FF00', // 中心扣车颜色
andCenterTrainColor: '#00FF00', // 车站+中心扣车颜色
centerTrainColor: ['#FFFF00', '#0000FF'], // 中心扣车颜色
localTrainColor: ['#FFFF00', '#0000FF'], // 车站扣车颜色
andCenterTrainColor: ['#FFFF00', '#0000FF'], // 车站+中心扣车颜色
detainTrainTextColor: '#FFFF00', // 车站扣除文字颜色
spareStrokeColor: '#000000', // 扣车描边颜色
lineWidth: 3, // 扣车线宽
@ -566,7 +567,7 @@ class SkinCode extends defaultStyle {
this[deviceType.ZcControl] = {
// 是否显示
visible: true,
visible: false,
text: {
fontSize: 11, // 字体大小
fontWeight: 'normal', // 字体粗细

View File

@ -53,7 +53,7 @@ export default class OutFrame extends Group {
if (showMode == '04') {
this.box && this.box.hide();
return;
}
}
if (!showConditions || showConditions === '01' || showMode === showConditions) {
this.box && this.box.show();
this.setState(this.model);

View File

@ -16,7 +16,8 @@ export default class EAxle extends Group {
const model = this.model.modelData;
if (model.leftAxlePosition) {
this.createAxleLeft();
} else if (model.rightAxlePosition) {
}
if (model.rightAxlePosition) {
this.createAxleRight();
}
}

View File

@ -173,7 +173,7 @@ export default class ELines extends Group {
});
this.routeArrowRight = new Isogon({
zlevel: this.zlevel,
origin: [cPointLeft.x, cPointLeft.y],
origin: [cPointRight.x, cPointRight.y],
rotation: -Math.PI / 2 - triangleRight.getRotation(),
z: Z + 9,
shape: {
@ -191,7 +191,7 @@ export default class ELines extends Group {
this.routeLineLeft = new Polyline({
zlevel: this.zlevel,
progressive: model.progressive,
z: Z,
z: Z + 9,
shape: {
points: pointsLeft
},
@ -203,7 +203,7 @@ export default class ELines extends Group {
this.routeLineRight = new Polyline({
zlevel: this.zlevel,
progressive: model.progressive,
z: Z,
z: Z + 9,
shape: {
points: pointsRight
},
@ -344,8 +344,8 @@ export default class ELines extends Group {
this.routeLineRight && this.routeLineRight.hide();
this.routeArrowLeft && this.routeArrowLeft.setStyle({ stroke: this.model.style.Section.routeArrow.defaultArrowStroke, fill: this.model.style.Section.routeArrow.defaultArrowFill });
this.routeArrowRight && this.routeArrowRight.setStyle({ stroke: this.model.style.Section.routeArrow.defaultArrowStroke, fill: this.model.style.Section.routeArrow.defaultArrowFill });
this.routeLineLeft && this.routeLineLeft.setStyle({ fill: this.model.style.Section.routeArrow.defaultLineStroke });
this.routeArrowRight && this.routeArrowRight.setStyle({ fill: this.model.style.Section.routeArrow.defaultLineStroke });
this.routeLineLeft && this.routeLineLeft.setStyle({ stroke: this.model.style.Section.routeArrow.defaultLineStroke });
this.routeLineRight && this.routeLineRight.setStyle({ stroke: this.model.style.Section.routeArrow.defaultLineStroke });
}
getBoundingRect() {
if (this.section) {

View File

@ -147,12 +147,13 @@ export default class Section extends Group {
});
}
/** 进路锁闭 04*/
routeLock() {
routeLock(lockRight) {
if (this.line) {
this.line.setStyle({
stroke: this.style.Section.line.routeLockColor,
lineWidth: this.style.Section.line.width + this.style.Section.line.beyondWidth
});
this.line.setRouteLock(lockRight);
}
}
@ -206,12 +207,13 @@ export default class Section extends Group {
}
/** 保护区段锁闭 09*/
protectiveLock() {
protectiveLock(lockRight) {
if (this.line) {
this.line.setStyle({
stroke: this.style.Section.line.protectiveLockColor,
lineWidth: this.style.Section.line.width + this.style.Section.line.beyondWidth
});
this.line.setRouteLock(lockRight);
}
}
@ -258,9 +260,9 @@ export default class Section extends Group {
}
// 顺序代表优先级
/** 道岔保护区段锁闭 */
model.overlapLock && this.protectiveLock();
model.overlapLock && this.protectiveLock(model.lockRight);
/** 空闲锁闭或者叫进路锁闭 */
model.routeLock && this.routeLock();
model.routeLock && this.routeLock(model.lockRight);
/** 轨道封锁 */
model.invalid && this.invalid();
/** 计轴故障 */

View File

@ -11,7 +11,6 @@ class EStationText extends Group {
create() {
const model = this.model.modelData;
const style = this.model.style;
// 车站名称
this.stationName = new Text({
zlevel: this.model.zlevel,
@ -33,6 +32,9 @@ class EStationText extends Group {
}
});
this.add(this.stationName);
if (!model.visible) {
this.stationName.setStyle('fontSize', 0);
}
if (model.subheadDisplay) { // 副标题
this.subheadText = new Text({
zlevel: this.model.zlevel,

View File

@ -13,7 +13,7 @@ import Text from 'zrender/src/graphic/Text';
import store from '@/store/index_APP_TARGET';
import EStationText from './EStationText';
import {traverseLineElements, traverseStatusElements} from '../utils/ShapeStatusCovert';
import { traverseLineElements } from '../utils/ShapeStatusCovert';
import Vue from 'vue';
@ -39,9 +39,9 @@ export default class Station extends Group {
const model = this.model;
const style = this.style;
// // 站台所有的绘图元素
// 站台所有的绘图元素
const elementTypeList = {
'stationText':EStationText // 车站名称 (普通站台样式)
'stationText': EStationText // 车站名称 (普通站台样式)
};
// 遍历当前线路下的绘图元素 组合模式
@ -75,6 +75,9 @@ export default class Station extends Group {
});
this.add(this.mileageText);
model.kmPostShow ? this.mileageText.show() : this.mileageText.hide();
if (!model.visible) {
this.mileageText.setStyle('fontSize', 0);
}
}
// if (!model.visible) { // 隐藏车站
@ -462,11 +465,13 @@ export default class Station extends Group {
}
setShowStation(flag) {
if (flag) {
this.eachChild(item => {
item.show();
});
if (this.mileageText) {
this.model.kmPostShow ? this.mileageText.show() : this.mileageText.hide();
if (this.model.visible) {
this.eachChild(item => {
item.show();
});
if (this.mileageText) {
this.model.kmPostShow ? this.mileageText.show() : this.mileageText.hide();
}
}
this.isShowShape = true;
this.setState(this.model);

View File

@ -11,7 +11,10 @@ class EPatternFilter extends Group {
create() {
const model = this.model.modelData;
const style = this.model.style;
const direction = model.right ? 1 : -1;
let direction = -1;
if ((model.right && model.inside) || (!model.right && !model.inside)) {
direction = 1;
}
const startX = (model.width / 2 + style.StationStand.patternFilter.offset.x);
const startY = model.position.y + (model.height / 2 + style.StationStand.patternFilter.offset.y) * direction + (1 + direction) / 2 * 14;

View File

@ -15,22 +15,27 @@ class EDetainCircle extends Group {
const standX = model.position.x - model.width / 2;
const standY = model.position.y - model.height / 2;
let y;
let y1;
let y2;
if (model.right && model.inside) {
y = standY + model.height / 2;
y1 = standY + model.height / 2;
y2 = standY;
} else if (model.right && !model.inside) {
y = standY;
y1 = standY;
y2 = standY + model.height / 2;
} else if (!model.right && model.inside) {
y = standY;
y1 = standY;
y2 = standY + model.height / 2;
} else if (!model.right && !model.inside) {
y = standY + model.height / 2;
y1 = standY + model.height / 2;
y2 = standY;
}
this.detainRect = new Rect({
this.detainRectTop = new Rect({
zlevel: this.model.zlevel,
z: this.model.z + 1,
shape: {
x: standX,
y: y,
y: y1,
width: model.width,
height: model.height / 2
},
@ -40,18 +45,38 @@ class EDetainCircle extends Group {
fill: '#000'
}
});
this.add(this.detainRect);
this.detainRect.hide();
this.detainRectBottom = new Rect({
zlevel: this.model.zlevel,
z: this.model.z + 1,
shape: {
x: standX,
y: y2,
width: model.width,
height: model.height / 2
},
style: {
lineWidth: style.StationStand.detainRect.lineWidth || 0,
stroke: style.StationStand.detainRect.spareStrokeColor,
fill: '#000'
}
});
this.add(this.detainRectTop);
this.add(this.detainRectBottom);
this.detainRectTop.hide();
this.detainRectBottom.hide();
}
setColor(color) {
this.detainRect.setStyle('stroke', color);
setColor(color1, color2) {
this.detainRectTop.setStyle('fill', color1);
this.detainRectBottom.setStyle('fill', color2);
}
setShow() {
this.detainRect.show();
this.detainRectTop.show();
this.detainRectBottom.show();
}
setHide() {
this.detainRect.hide();
this.detainRectTop.hide();
this.detainRectBottom.hide();
}
recover() {
this.setHide();
@ -61,14 +86,14 @@ class EDetainCircle extends Group {
const style = this.model.style;
/** 设置扣车*/
if (model.stationHoldTrain && model.centerHoldTrain) {
this.showMode();
this.setColor(style.StationStand.detainRect.centerTrainColor);
this.setShow();
this.setColor(...style.StationStand.detainRect.centerTrainColor);
} else if (model.stationHoldTrain) {
this.showMode();
this.setColor(style.StationStand.detainRect.detainTrainTextColor);
this.setShow();
this.setColor(...style.StationStand.detainRect.localTrainColor);
} else if (model.centerHoldTrain) {
this.showMode();
this.setColor(style.StationStand.detainRect.centerTrainColor);
this.setShow();
this.setColor(...style.StationStand.detainRect.centerTrainColor);
}
}
}

View File

@ -25,7 +25,9 @@ class ESolidStand extends Group {
height: model.height
},
style: {
'fill':style.StationStand.solidStand.spareColor
fill:style.StationStand.solidStand.spareColor,
lineWidth: style.StationStand.solidStand.lineWidth || 0,
stroke: style.StationStand.solidStand.spareStrokeColor
}
});
this.add(this.stand);
@ -61,10 +63,13 @@ class ESolidStand extends Group {
setColor(color) {
this.stand.setStyle('fill', color);
}
setStroke(color) {
this.stand.setStyle('stroke', color);
}
recover() {
const style = this.model.style;
this.setColor(style.StationStand.solidStand.spareColor);
this.setStroke(style.StationStand.solidStand.spareStrokeColor);
}
setState(model) {
@ -77,6 +82,7 @@ class ESolidStand extends Group {
model.allSkip && this.setColor(style.StationStand.solidStand.jumpStopColor);
// 停车
model.trainParking && this.setColor(style.StationStand.solidStand.stopColor);
model.trainParking && this.setStroke(style.StationStand.solidStand.doorOpenColor);
// 紧急停车
model.emergencyClosed && this.setColor(this.style.StationStand.solidStand.spareColor);
} else {

View File

@ -123,19 +123,19 @@ export default class EFoldbackMode extends Group {
});
this.add(this.lateralLineRect);
this.add(this.lateralLine);
}
}
highlightType1(color) {
this.lateralLinePriorityRect && this.lateralLinePriorityRect.setStyle('stroke', color);
this.lateralLinePriority1 && this.lateralLinePriority1.setStyle('stroke', color);
this.lateralLinePriority2 && this.lateralLinePriority2.setStyle('stroke', color);
}
highlightType2(color) {
this.linearFoldbackRect && this.linearFoldbackRect.setStyle('stroke', color);
this.linearFoldback && this.linearFoldback.setStyle('stroke', color);
}
highlightType3(color) {
this.lateralLineRect && this.lateralLineRect.setStyle('stroke', color);
this.lateralLine && this.lateralLine.setStyle('stroke', color);
}
highlightType1(color) {
this.lateralLinePriorityRect && this.lateralLinePriorityRect.setStyle('stroke', color);
this.lateralLinePriority1 && this.lateralLinePriority1.setStyle('stroke', color);
this.lateralLinePriority2 && this.lateralLinePriority2.setStyle('stroke', color);
}
highlightType2(color) {
this.linearFoldbackRect && this.linearFoldbackRect.setStyle('stroke', color);
this.linearFoldback && this.linearFoldback.setStyle('stroke', color);
}
highlightType3(color) {
this.lateralLineRect && this.lateralLineRect.setStyle('stroke', color);
this.lateralLine && this.lateralLine.setStyle('stroke', color);
}
}

View File

@ -21,7 +21,7 @@ export default class StationTurnBack extends Group {
}
create() {
const model = this.model;
const style = this.style;
const style = this.style;
if (model.show && !style.StationTurnBack.spliceShow) {
this.control = new Circle({
@ -95,9 +95,9 @@ export default class StationTurnBack extends Group {
this.add(this.controlRect);
this.add(this.text);
this.add(this.strategyText);
}
if (style.StationTurnBack.spliceShow) {
this.control = new EFoldbackMode({
}
if (style.StationTurnBack.spliceShow) {
this.control = new EFoldbackMode({
zlevel: this.zlevel,
z: this.z,
x: model.position.x,
@ -106,21 +106,21 @@ export default class StationTurnBack extends Group {
style: style
});
this.add(this.control);
}
}
}
recover() {
const path = window.location.href;
if (!path.includes('/map/draw')) {
this.strategyText && this.strategyText.hide();
}
if (this.style.ReturnModeGroup) {
this.control && this.control.highlightType1(this.style.ReturnModeGroup.highlightColor);
}
if (this.style.ReturnModeGroup) {
this.control && this.control.highlightType1(this.style.ReturnModeGroup.highlightColor);
// this.control && this.control.highlightType1(this.style.ReturnModeGroup.strokeColor);
this.control && this.control.highlightType2(this.style.ReturnModeGroup.strokeColor);
this.control && this.control.highlightType3(this.style.ReturnModeGroup.strokeColor);
}
// this.control && this.control.highlightType1(this.style.ReturnModeGroup.strokeColor);
this.control && this.control.highlightType2(this.style.ReturnModeGroup.strokeColor);
this.control && this.control.highlightType3(this.style.ReturnModeGroup.strokeColor);
}
}
handleStatus(name) {
@ -129,19 +129,19 @@ export default class StationTurnBack extends Group {
style: {
text: name
}
});
if (this.style.ReturnModeGroup) {
this.control && this.control.highlightType1(this.style.ReturnModeGroup.strokeColor);
this.control && this.control.highlightType2(this.style.ReturnModeGroup.strokeColor);
this.control && this.control.highlightType3(this.style.ReturnModeGroup.strokeColor);
if (name == '优先折返') {
this.control && this.control.highlightType1(this.style.ReturnModeGroup.highlightColor);
} else if (name == '直线折返') {
this.control && this.control.highlightType2(this.style.ReturnModeGroup.highlightColor);
} else if (name == '侧线折返') {
this.control && this.control.highlightType3(this.style.ReturnModeGroup.highlightColor);
}
}
});
if (this.style.ReturnModeGroup) {
this.control && this.control.highlightType1(this.style.ReturnModeGroup.strokeColor);
this.control && this.control.highlightType2(this.style.ReturnModeGroup.strokeColor);
this.control && this.control.highlightType3(this.style.ReturnModeGroup.strokeColor);
if (name == '优先折返') {
this.control && this.control.highlightType1(this.style.ReturnModeGroup.highlightColor);
} else if (name == '直线折返') {
this.control && this.control.highlightType2(this.style.ReturnModeGroup.highlightColor);
} else if (name == '侧线折返') {
this.control && this.control.highlightType3(this.style.ReturnModeGroup.highlightColor);
}
}
}
// 设置状态

View File

@ -1,6 +1,7 @@
import Text from 'zrender/src/graphic/Text';
import Group from 'zrender/src/container/Group';
import {isShowThePrdType} from '../../utils/handlePath';
import BoundingRect from 'zrender/src/core/BoundingRect';
import Vue from 'vue';
export default class Text2 extends Group {
@ -14,10 +15,10 @@ export default class Text2 extends Group {
this.style = style;
this.z = 6;
this.isShowShape = true;
// if (isShowThePrdType(model.prdType, model.showConditions) || model.previewOrMapDraw) {
this.create();
this.setState(model);
// }
if (isShowThePrdType(model.prdType, model.showConditions) || model.previewOrMapDraw) {
this.create();
this.setState(model);
}
if (model.previewOrMapDraw) {
this.setShowMode();
}
@ -39,6 +40,7 @@ export default class Text2 extends Group {
x: model.position.x,
y: model.position.y,
text: content,
fontFamily: this.style.fontFamily,
fontSize: Number(model.font),
textFill: model.fontColor,
textAlign: 'middle'
@ -53,6 +55,8 @@ export default class Text2 extends Group {
getBoundingRect() {
if (this.text) {
return this.text.getBoundingRect().clone();
} else {
return new BoundingRect(this.model.position.x, this.model.position.y, 0, 0);
}
}
// 设置显示模式

View File

@ -71,7 +71,8 @@ export default class ETriangle extends Group {
zlevel: model.zlevel,
z: model.z,
shape: {
points:[[model.point.x + 10 * right, model.point.y], [model.point.x, model.point.y - 6], [model.point.x, model.point.y + 6]]
// points:[[model.point.x + 10 * right, model.point.y], [model.point.x, model.point.y - 6], [model.point.x, model.point.y + 6]]
points:[[model.point.x, model.point.y], [model.point.x - 10 * right, model.point.y - 6], [model.point.x - 10 * right, model.point.y + 6]]
},
style: {
stroke:'#00FF00',
@ -88,9 +89,12 @@ export default class ETriangle extends Group {
if (this.angle) {
const trainRight = right == 1 ? 1 : -1;
let data = [
[model.x + 10 * trainRight, model.y],
[model.x, model.y - 6],
[model.x, model.y + 6]
// [model.x + 10 * trainRight, model.y],
// [model.x, model.y - 6],
// [model.x, model.y + 6]
[model.x, model.y],
[model.x - 10 * trainRight, model.y - 6],
[model.x - 10 * trainRight, model.y + 6]
];
if (this.style.Section.trainPosition.specialShow) {
data = [

View File

@ -143,7 +143,7 @@ export default class Train extends Group {
});
oldPoint = 0;
this.pointList.forEach(point => {
point.percentStart = oldPoint / this.lineLength;
point.percentStart = (oldPoint / this.lineLength) < 0.001 ? 0 : (oldPoint / this.lineLength);
oldPoint += point.length;
point.percentEnd = oldPoint / this.lineLength;
});
@ -190,8 +190,10 @@ export default class Train extends Group {
if (train.physicalCode && train.offsetp && this.triangle) {
this.pointList.forEach(point => {
if (train.offsetp > point.percentStart && train.offsetp <= point.percentEnd) {
this.startX = point.pointStart.x + (point.pointEnd.x - point.pointStart.x) * (train.offsetp - point.percentStart);
this.startY = point.pointStart.y + (point.pointEnd.y - point.pointStart.y) * (train.offsetp - point.percentStart);
let offsetp = train.offsetp;
if (train.offsetp > 0.99) { offsetp = 1; }
this.startX = point.pointStart.x + (point.pointEnd.x - point.pointStart.x) * (offsetp - point.percentStart);
this.startY = point.pointStart.y + (point.pointEnd.y - point.pointStart.y) * (offsetp - point.percentStart);
}
});
const point = { x: this.startX, y: this.startY };

View File

@ -131,6 +131,8 @@
<train-detail ref="trainDetail" />
<all-train-detail ref="allTrainDetail" />
<route-detail ref="routeDetail" />
<init-section-open ref="initSectionOpen" />
<init-section-limit-speed ref="initSectionLimitSpeed" />
</div>
</template>
<script>
@ -161,6 +163,7 @@ import SignalCanBlock from './menuDialog/signalCanBlock';
import RouteCommand from './menuDialog/routeCommand';
import SectionOpen from './menuDialog/sectionOpen';
import SectionLimitSpeed from './menuDialog/sectionLimitSpeed';
import InitSectionLimitSpeed from './menuDialog/initSectionLimitSpeed';
import SectionShow from './menuDialog/sectionShow';
import SectionLock from './menuDialog/sectionLock';
import SignalModel from './menuDialog/signalModel';
@ -184,7 +187,7 @@ import TrainRunType from './menuDialog/trainRunType';
import TrainDetail from './menuDialog/trainDetail';
import AllTrainDetail from './menuDialog/allTrainDetail';
import RouteDetail from './menuDialog/routeDetail';
import Route from '../../../../views/newMap/newMapdraft/dataRelation/runLeveloperate/route';
import InitSectionOpen from './menuDialog/initSectionOpen';
export default {
name: 'MenuBar',
@ -232,7 +235,9 @@ export default {
TrainRunType,
TrainDetail,
AllTrainDetail,
RouteDetail
RouteDetail,
InitSectionOpen,
InitSectionLimitSpeed
},
props: {
selected: {
@ -426,7 +431,8 @@ export default {
},
{
title: '设置站间列车数量',
click: this.setIntervalStopNumber
// click: this.setIntervalStopNumber
click: this.undeveloped
},
{
title: '分配停站时间',
@ -531,23 +537,28 @@ export default {
children: [
{
title: '取消转换锁闭',
click: this.handleLock
// click: this.handleLock
click: this.undeveloped
},
{
title: '取消过岔锁闭',
click: this.handleUnLock
// click: this.handleUnLock
click: this.undeveloped
},
{
title: '远程预复位使能',
click: this.handleRestoration
// click: this.handleRestoration
click: this.undeveloped
},
{
title: '复位',
click: this.handleSectionRestoration
// click: this.handleSectionRestoration
click: this.undeveloped
},
{
title: '显示',
click: this.handleSectionStopShow
// click: this.handleSectionStopShow
click: this.undeveloped
}
]
},
@ -597,11 +608,13 @@ export default {
children: [
{
title: 'CBTC',
click: this.setCbtcMode
// click: this.setCbtcMode
click: this.undeveloped
},
{
title: '后备',
click: this.setReserveMode
// click: this.setReserveMode
click: this.undeveloped
}
]
},
@ -1471,7 +1484,7 @@ export default {
setBlockSwitch() {
const operate = {
type: 'bar',
operation: OperationEvent.Switch.block.init.operation
operation: OperationEvent.Switch.block.button.operation
};
this.$store.dispatch('training/nextNew', operate).then(({valid}) => {
if (valid) {
@ -1485,7 +1498,7 @@ export default {
setUnblockSwitch() {
const operate = {
type: 'bar',
operation: OperationEvent.Switch.unblock.init.operation
operation: OperationEvent.Switch.unblock.button.operation
};
this.$store.dispatch('training/nextNew', operate).then(({valid}) => {
if (valid) {
@ -1565,26 +1578,26 @@ export default {
handleOpenSection() {
const operate = {
type: 'bar',
operation: ''
operation: OperationEvent.Section.unlock.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({valid}) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', {break: true});
this.$refs.sectionOpen.doShow();
this.$refs.initSectionOpen.doShow(operate);
}
});
},
handleCloseSection() {
const operate = {
type: 'bar',
operation: ''
operation: OperationEvent.Section.lock.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({valid}) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', {break: true});
this.$refs.sectionOpen.doShow();
this.$refs.initSectionOpen.doShow(operate);
}
});
},
@ -1597,7 +1610,7 @@ export default {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', {break: true});
this.$refs.sectionLimitSpeed.doShow();
this.$refs.initSectionLimitSpeed.doShow();
}
});
},
@ -1701,20 +1714,20 @@ export default {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', {break: true});
this.$refs.signalBlock.doShow(operate);
this.$refs.initSignalBlock.doShow(operate);
}
});
},
setSignalCancelBlock() {
const operate = {
type: 'bar',
operation: OperationEvent.Signal.lock.menu.operation
operation: OperationEvent.Signal.unlock.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({valid}) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', {break: true});
this.$refs.signalBlock.doShow(operate);
this.$refs.initSignalBlock.doShow(operate);
}
});
},

View File

@ -1,13 +1,23 @@
<template>
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="800px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<el-row>
<el-table :data="stationStandList" height="150px">
<el-table
ref="singleTable"
:data="stationStandList"
highlight-current-row
height="150px"
@current-change="handleCurrentChange"
>
<el-table-column prop="name" label="站台" />
<el-table-column prop="minTime" label="最小停站时间" />
<el-table-column prop="time" label="规定停站时间" />
<el-table-column prop="parkingTime" label="规定停站时间">
<template slot-scope="scope">
<span>{{ getParkingTime(scope.row.code) }}</span>
</template>
</el-table-column>
<el-table-column prop="maxTime" label="最大停站时间" />
</el-table>
<el-checkbox v-model="checkAll">所有站台(L)</el-checkbox>
<el-checkbox v-model="checkAll" :disabled="true">所有站台(L)</el-checkbox>
</el-row>
<el-row>
<el-col :span="12">
@ -20,19 +30,19 @@
<el-row style="text-align: center">
<el-col :span="8">最小值</el-col>
<el-col :span="8">
<el-input-number v-model="minTime" controls-position="right" size="mini" :min="0" :max="999" style="width: 100px;" />
<el-input-number v-model="minTime" :disabled="true" controls-position="right" size="mini" :min="0" :max="999" style="width: 100px;" />
</el-col>
<el-col :span="8">
<el-input v-model="minTimeValue" size="mini" style="width: 80px;" />
<el-input v-model="minTimeValue" size="mini" :disabled="true" style="width: 80px;" />
</el-col>
</el-row>
<el-row style="text-align: center">
<el-col :span="8">最大值</el-col>
<el-col :span="8">
<el-input-number v-model="maxTime" controls-position="right" size="mini" :min="0" :max="999" style="width: 100px;" />
<el-input-number v-model="maxTime" :disabled="true" controls-position="right" size="mini" :min="0" :max="999" style="width: 100px;" />
</el-col>
<el-col :span="8">
<el-input v-model="maxTimeValue" size="mini" style="width: 80px;" />
<el-input v-model="maxTimeValue" size="mini" :disabled="true" style="width: 80px;" />
</el-col>
</el-row>
</div>
@ -53,15 +63,15 @@
<el-row style="text-align: center;">
<el-col :span="8">额定值</el-col>
<el-col :span="8">
<el-input-number v-model="ratedValue" controls-position="right" size="mini" :min="0" :max="999" style="width: 100px;" />
<el-input-number v-model="ratedValue" :disabled="true" controls-position="right" size="mini" :min="0" :max="999" style="width: 100px;" />
</el-col>
<el-col :span="8">
<el-input v-model="ratedValue11" size="mini" style="width: 80px;" />
<el-input v-model="ratedValue11" :disabled="true" size="mini" style="width: 80px;" />
</el-col>
</el-row>
</div>
<el-row style="padding: 10px 0;">
<el-button @click="handleReset">复位</el-button>
<el-button @click="handleReset">复位(R)</el-button>
</el-row>
<el-row>
<div style="padding: 2px 20px;border: 1px solid #ADADAD;width: 180px;text-align: center;">停站时间范围1-999</div>
@ -70,7 +80,7 @@
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="4" :offset="1">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定(O)</el-button>
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!selected" @click="commit">确定(O)</el-button>
</el-col>
<el-col :span="4" :offset="2">
<el-button>应用(A)</el-button>
@ -89,7 +99,7 @@
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
// import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import { mapGetters } from 'vuex';
export default {
name: 'AllocateTime',
@ -156,9 +166,29 @@ export default {
doClose() {
this.loading = false;
this.dialogShow = false;
this.$refs.singleTable.setCurrentRow();
this.$store.dispatch('training/emitTipFresh');
},
commit() {
commitOperate(menuOperate.StationStand.setStopTime, {standCode: this.selected.code, parkingTime: this.currentTime, parkingAlwaysValid: false}, 3).then(({valid})=>{
if (valid) {
this.doClose();
}
});
},
handleCurrentChange(val) {
if (!val) { return; }
commitOperate(menuOperate.StationStand.setStopTime, {code:val.code}).then(({valid, operate})=>{
if (valid) {
const stand = this.$store.getters['map/getDeviceByCode'](val.code);
this.currentTime = stand.parkingTime;
this.selected = val;
}
});
},
getParkingTime(code) {
const stand = this.$store.getters['map/getDeviceByCode'](code);
return stand.parkingTime;
},
handleReset() {
},

View File

@ -0,0 +1,292 @@
<template>
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="1000px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<el-row>
<el-col :span="20">
<el-table ref="singleTable1" :data="tempData" highlight-current-row height="300px" @current-change="selectLine1">
<el-table-column prop="name" width="100" label="轨道" />
<el-table-column prop="blockStatus" width="120" label="MAU">
<template slot-scope="scope">
<span>{{ getStationName(scope.row) }}</span>
</template>
</el-table-column>
<el-table-column prop="blockProcess" width="80" label="临时限速">
<template slot-scope="scope">
<span>{{ getLimitSpeed(scope.row.code) }}</span>
</template>
</el-table-column>
<el-table-column prop="unblockProcess" label="PM临时限速" width="110">
<template slot-scope="scope">
<span>{{ getIsLimit(scope.row.code) }}</span>
</template>
</el-table-column>
<el-table-column prop="blockProcess" label="设置临时限速进程" width="140">
<template slot-scope="scope">
<span>{{ getProcess(scope.row.code) }}</span>
</template>
</el-table-column>
<el-table-column prop="unblockProcess" label="用户里程起点" width="110" />
<el-table-column prop="unblockProcess" label="用户里程终点" width="110" />
</el-table>
</el-col>
<el-col :span="4">
<el-table ref="singleTable2" :data="limitList" highlight-current-row height="300px" @current-change="selectLine2">
<el-table-column prop="name" label="速度" />
</el-table>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="4" :offset="1">
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!selected || speedLimitValue<=0" @click="commit">确定(O)</el-button>
</el-col>
<el-col :span="4" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading">应用(A)</el-button>
</el-col>
<el-col :span="4" :offset="2">
<el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button>
</el-col>
<el-col :span="4" :offset="2">
<el-button>帮助(H)</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
<section-limit-speed ref="sectionLimitSpeed" @commandSuccess="commandSuccess" @cancelCommand="cancelCommand" />
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
// import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import { mapGetters } from 'vuex';
import SectionLimitSpeed from './sectionLimitSpeed';
export default {
name: 'SwitchActive',
components: {
NoticeInfo,
SectionLimitSpeed
},
data() {
return {
status: false,
standStatus: true,
allChecked: false,
dialogShow: false,
loading: false,
selected: null,
active: false,
activeName: 'first',
tempData: [],
radio: '1',
limitList: [
{ name: '5', value: 5 },
{ name: '10', value: 10 },
{ name: '15', value: 15 },
{ name: '20', value: 20 },
{ name: '25', value: 25 },
{ name: '30', value: 30 },
{ name: '35', value: 35 },
{ name: '40', value: 40 },
{ name: '45', value: 45 },
{ name: '50', value: 50 },
{ name: '55', value: 55 },
{ name: '60', value: 60 },
{ name: '65', value: 65 },
{ name: '70', value: 70 },
{ name: '75', value: 75 },
{ name: '80', value: 80 }
],
initEle: null,
commandEleCode:null,
speedLimitValue: 0
};
},
computed: {
...mapGetters('map', [
'sectionList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdChoose() {
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.choose.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menu.domId : '';
},
title() {
return '初始化设置临时限速区域';
}
},
watch: {
'$store.state.map.keyboardEnterCount': function (val) {
if (this.show) {
this.commit();
}
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate, selected) {
this.tempData = [];
this.sectionList.forEach(item => {
if (item.type === '01' || item.type === '04') {
this.tempData.push(item);
}
});
this.selected = selected;
this.initEle = null;
this.commandEleCode = null;
this.speedLimitValue = 0;
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$refs.singleTable1.setCurrentRow();
this.$refs.singleTable2.setCurrentRow();
this.$store.dispatch('training/emitTipFresh');
},
selectLine1(val) {
if (!val) { return; }
this.initEle = null;
this.commandEleCode = null;
const step = {
code: `${val.code}`,
operation: OperationEvent.Section.setSpeed.choose.operation,
param: {}
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.selected = val;
const sectionEle = this.$store.getters['map/getDeviceByCode'](val.code);
this.speedLimitValue = sectionEle.speedUpLimit;
if (this.speedLimitValue > 0) {
this.$refs.singleTable2.setCurrentRow(this.limitList[this.speedLimitValue / 5 - 1]);
} else {
this.$refs.singleTable2.setCurrentRow();
}
}
}).catch(() => {
this.$refs.noticeInfo.doShow();
});
},
selectLine2(val) {
if (!val) { return; }
this.initEle = null;
this.commandEleCode = null;
const step = {
operation: OperationEvent.Section.setSpeed.choose1.operation,
param: {speedLimitValue: val.value}
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.speedLimitValue = val.value;
}
}).catch(() => {
this.$refs.noticeInfo.doShow();
});
},
getStationName(val) {
const stationElm = this.$store.getters['map/getDeviceByCode'](val.stationCode);
return stationElm.name;
},
getIsLimit(code) {
if (this.commandEleCode === code) {
return this.speedLimitValue > 0 ? '开启' : '关闭';
}
const sectionEle = this.$store.getters['map/getDeviceByCode'](code);
return sectionEle.speedUpLimit > 0 ? '开启' : '关闭';
},
getLimitSpeed(code) {
if (this.commandEleCode === code) {
return this.speedLimitValue > 0 ? this.speedLimitValue : 0;
}
const sectionEle = this.$store.getters['map/getDeviceByCode'](code);
return sectionEle.speedUpLimit > 0 ? sectionEle.speedUpLimit : 0;
},
getProcess(code) {
if (this.commandEleCode && this.commandEleCode === code) {
return '完成';
} else if (this.initEle && this.initEle.code === code) {
return '已初始化';
} else {
return '';
}
},
commit() {
const step = {
code: `${this.selected.code}`,
operation: OperationEvent.Section.setSpeed.confirm.operation,
param: {}
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.sectionLimitSpeed.doShow(step, this.selected, this.speedLimitValue);
this.initEle = this.selected;
}
}).catch(() => {
this.$refs.noticeInfo.doShow();
});
},
commandSuccess(code, val) {
this.commandEleCode = code;
if (!val) {
this.speedLimitValue = 0;
this.$refs.singleTable2.setCurrentRow();
}
},
cancelCommand() {
this.initEle = null;
},
handleClick() {
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.menu-li {
height: 30px;
line-height: 30px;
text-align: left;
list-style:none;
padding-left: 5px;
border-right: 2px solid #696969;
color: #000;
}
/deep/ {
.el-radio {
color: #000;
font-weight: bold;
}
.el-cascader-node>.el-radio, .el-radio:last-child{
margin-right: 20px;
}
}
</style>

View File

@ -0,0 +1,232 @@
<template>
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="700px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<el-row>
<el-table ref="singleTable" :data="tempData" highlight-current-row height="300px" @current-change="selectLine">
<el-table-column prop="name" label="轨道" />
<el-table-column prop="blockStatus" label="MAU">
<template slot-scope="scope">
<span>{{ getStationName(scope.row) }}</span>
</template>
</el-table-column>
<el-table-column prop="blockProcess" label="状态">
<template slot-scope="scope">
<span>{{ getSectionStatus(scope.row.code) }}</span>
</template>
</el-table-column>
<el-table-column prop="unblockProcess" :label="isBlock?'关闭进程':'打开进程'">
<template slot-scope="scope">
<span>{{ getProcess(scope.row.code) }}</span>
</template>
</el-table-column>
</el-table>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="4" :offset="1">
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="commitDisabled" @click="commit">确定(O)</el-button>
</el-col>
<el-col :span="4" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading">应用(A)</el-button>
</el-col>
<el-col :span="4" :offset="2">
<el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button>
</el-col>
<el-col :span="4" :offset="2">
<el-button>帮助(H)</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
<section-open ref="sectionOpen" @commandSuccess="commandSuccess" @cancelCommand="cancelCommand" />
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
// import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import { mapGetters } from 'vuex';
import SectionOpen from './sectionOpen';
export default {
name: 'SwitchActive',
components: {
NoticeInfo,
SectionOpen
},
data() {
return {
status: false,
operate: {},
standStatus: true,
allChecked: false,
dialogShow: false,
loading: false,
selected: null,
active: false,
selectShow: false,
activeName: 'first',
tempData: [],
radio: '1',
initEle: null,
commandEleCode: null
};
},
computed: {
...mapGetters('map', [
'sectionList'
]),
isBlock() {
return !!this.operate && this.operate.operation === OperationEvent.Section.lock.menu.operation;
},
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdChoose() {
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.choose.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menu.domId : '';
},
title() {
return this.isBlock ? '初始化关闭轨道' : '初始化开放轨道';
},
commitDisabled() {
const sectionEle = this.$store.getters['map/getDeviceByCode']((this.selected || {}).code);
return !this.selected || (sectionEle.blockade && this.isBlock) || (!sectionEle.blockade && !this.isBlock);
}
},
watch: {
'$store.state.map.keyboardEnterCount': function (val) {
if (this.show) {
this.commit();
}
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate, selected) {
this.tempData = [];
this.sectionList.forEach(item => {
if (item.type === '01' || item.type === '04') {
this.tempData.push(item);
}
});
this.initEle = null;
this.commandEleCode = null;
this.selected = selected;
this.operate = operate;
//
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$refs.singleTable.setCurrentRow();
this.$store.dispatch('training/emitTipFresh');
},
selectLine(val) {
if (!val) { return; }
this.initEle = null;
this.commandEleCode = null;
const step = {
code: `${val.code}`,
operation: this.isBlock ? OperationEvent.Section.lock.choose.operation : OperationEvent.Section.unlock.choose.operation,
param: {}
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.selected = val;
}
}).catch(() => {
this.$refs.noticeInfo.doShow();
});
},
getProcess(code) {
if (this.commandEleCode && this.commandEleCode === code) {
return this.isBlock ? '已完成关闭' : '已完成打开';
} else if (this.initEle && this.initEle.code === code) {
return '已初始化';
} else {
return '';
}
},
getStationName(val) {
const stationElm = this.$store.getters['map/getDeviceByCode'](val.stationCode);
return stationElm.name;
},
getSectionStatus(code) {
const sectionElm = this.$store.getters['map/getDeviceByCode'](code);
if (this.commandEleCode && this.commandEleCode === code && this.isBlock) {
return '关闭双向:所有列车';
} else if (this.commandEleCode && this.commandEleCode === code && !this.isBlock) {
return '打开';
}
return sectionElm.blockade ? '关闭双向:所有列车' : '打开';
},
commit() {
const step = {
code: `${this.selected.code}`,
operation: this.isBlock ? OperationEvent.Section.lock.confirm.operation : OperationEvent.Section.unlock.confirm.operation,
param: {}
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.sectionOpen.doShow(step, this.selected);
this.initEle = this.selected;
}
}).catch(() => {
this.$refs.noticeInfo.doShow();
});
},
commandSuccess(code) {
this.commandEleCode = code;
},
cancelCommand() {
this.initEle = null;
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.menu-li {
height: 30px;
line-height: 30px;
text-align: left;
list-style:none;
padding-left: 5px;
border-right: 2px solid #696969;
color: #000;
}
/deep/ {
.el-radio {
color: #000;
font-weight: bold;
}
.el-cascader-node>.el-radio, .el-radio:last-child{
margin-right: 20px;
}
}
</style>

View File

@ -1,16 +1,34 @@
<template>
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="600px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<el-row>
<el-table :data="signalList" height="350px">
<el-table
ref="singleTable"
:data="signalList"
highlight-current-row
height="350px"
@current-change="handleCurrentChange"
>
<el-table-column prop="name" label="信号机" />
<el-table-column prop="status" label="信号机封锁状态" />
<el-table-column prop="status" label="设置封锁进程" />
<el-table-column prop="status" label="解除封锁进程" />
<el-table-column prop="status" label="信号机封锁状态">
<template slot-scope="scope">
<span>{{ getSignalStatus(scope.row.code) }}</span>
</template>
</el-table-column>
<el-table-column prop="blockProcess" label="设置封锁进程">
<template slot-scope="scope">
<span>{{ getProcess(scope.row.code, 'lock') }}</span>
</template>
</el-table-column>
<el-table-column prop="unblockProcess" label="解除封锁进程">
<template slot-scope="scope">
<span>{{ getProcess(scope.row.code, 'unlock') }}</span>
</template>
</el-table-column>
</el-table>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="4" :offset="1">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定(O)</el-button>
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!selected || !!initEle" @click="commit">确定(O)</el-button>
</el-col>
<el-col :span="4" :offset="2">
<el-button>应用(A)</el-button>
@ -23,6 +41,7 @@
</el-col>
</el-row>
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
<signal-block ref="signalBlock" @commandSuccess="commandSuccess" @cancelCommand="cancelCommand" />
</el-dialog>
</template>
@ -31,11 +50,13 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
// import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import { mapGetters } from 'vuex';
import SignalBlock from './signalBlock';
export default {
name: 'InitSignalBlock',
components: {
NoticeInfo
NoticeInfo,
SignalBlock
},
data() {
return {
@ -45,13 +66,18 @@ export default {
dialogShow: false,
loading: false,
selected: null,
operate: {}
operate: {},
initEle: null,
commandEleCode: null
};
},
computed: {
...mapGetters('map', [
'signalList'
]),
isBlock() {
return this.operate && this.operate.operation === OperationEvent.Signal.lock.menu.operation;
},
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
@ -82,6 +108,8 @@ export default {
},
methods: {
doShow(operate, selected) {
this.initEle = null;
this.commandEleCode = null;
this.selected = selected;
this.operate = operate;
//
@ -93,12 +121,68 @@ export default {
doClose() {
this.loading = false;
this.dialogShow = false;
this.$refs.singleTable.setCurrentRow();
this.$store.dispatch('training/emitTipFresh');
},
commit() {
const step = {
code: `${this.selected.code}`,
operation: this.isBlock ? OperationEvent.Signal.lock.confirm.operation : OperationEvent.Signal.unlock.confirm.operation,
param: {}
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.signalBlock.doShow(step, this.selected);
this.initEle = this.selected;
}
}).catch(() => {
this.$refs.noticeInfo.doShow();
});
},
handleClick() {
handleCurrentChange(val) {
if (!val) { return; }
this.initEle = null;
this.commandEleCode = null;
const step = {
code: `${val.code}`,
operation: this.isBlock ? OperationEvent.Signal.lock.choose.operation : OperationEvent.Signal.unlock.choose.operation,
param: {}
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.selected = val;
}
}).catch(() => {
this.$refs.noticeInfo.doShow();
});
},
getSignalStatus(code) {
const signalEle = this.$store.getters['map/getDeviceByCode'](code);
if (this.commandEleCode === code) {
return this.isBlock ? '锁闭的' : '未锁闭的';
}
if (signalEle.blockade) {
return '锁闭的';
} else {
return '未设锁闭';
}
},
commandSuccess(code) {
this.commandEleCode = code;
},
cancelCommand() {
this.initEle = null;
},
getProcess(code, type) {
if (this.commandEleCode && this.commandEleCode === code && ((type === 'lock' && this.isBlock) || (type === 'unlock' && !this.isBlock))) {
return this.isBlock ? '已完成封锁' : '已完成解封';
} else if (this.initEle && this.initEle.code === code && ((type === 'lock' && this.isBlock) || (type === 'unlock' && !this.isBlock))) {
return '已初始化';
} else {
return '';
}
},
cancel() {
const operate = {

View File

@ -1,16 +1,30 @@
<template>
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="600px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="700px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<el-row>
<el-table :data="signalList" height="300px">
<el-table
ref="singleTable"
:data="signalList"
highlight-current-row
height="300px"
@current-change="handleCurrentChange"
>
<el-table-column prop="name" label="信号机" />
<el-table-column prop="blockStatus" label="允许锁闭" />
<el-table-column prop="blockProcess" label="同意取消" />
<el-table-column prop="unblockProcess" label="取消进程" />
<el-table-column prop="blockStatus" label="允许锁闭">
<template slot-scope="scope">
<span>{{ getSignalBlock(scope.row.code) }}</span>
</template>
</el-table-column>
<el-table-column prop="blockProcess" label="同意取消"></el-table-column>
<el-table-column prop="unblockProcess" label="取消进程">
<template slot-scope="scope">
<span>{{ getProcess(scope.row.code) }}</span>
</template>
</el-table-column>
</el-table>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="4" :offset="1">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定(O)</el-button>
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!selected" @click="commit">确定(O)</el-button>
</el-col>
<el-col :span="4" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">应用(A)</el-button>
@ -23,6 +37,7 @@
</el-col>
</el-row>
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
<signal-can-block ref="signalCanBlock" @commandSuccess="commandSuccess" @cancelCommand="cancelCommand" />
</el-dialog>
</template>
@ -31,11 +46,13 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
// import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import { mapGetters } from 'vuex';
import SignalCanBlock from './signalCanBlock';
export default {
name: 'StandDetain',
components: {
NoticeInfo
NoticeInfo,
SignalCanBlock
},
data() {
return {
@ -45,7 +62,9 @@ export default {
dialogShow: false,
loading: false,
selected: null,
operate: ''
operate: '',
initEle: null,
commandEleCode: null
};
},
computed: {
@ -82,6 +101,8 @@ export default {
},
methods: {
doShow(operate, selected) {
this.initEle = null;
this.commandEleCode = null;
this.selected = selected;
this.operate = operate;
//
@ -93,12 +114,65 @@ export default {
doClose() {
this.loading = false;
this.dialogShow = false;
this.$refs.singleTable.setCurrentRow();
this.$store.dispatch('training/emitTipFresh');
},
commit() {
const step = {
code: `${this.selected.code}`,
operation: OperationEvent.Signal.lock.confirm.operation,
param: {}
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.signalCanBlock.doShow(step, this.selected);
this.initEle = this.selected;
}
}).catch(() => {
this.$refs.noticeInfo.doShow();
});
},
handleClick() {
getSignalBlock(code) {
const signalEle = this.$store.getters['map/getDeviceByCode'](code);
if (signalEle.blockade) {
return '关闭';
} else {
return '开启';
}
},
getProcess(code) {
if (this.commandEleCode === code) {
return '完成';
} else if (this.initEle && this.initEle.code === code) {
return '已初始化';
} else {
return '';
}
},
commandSuccess(code) {
this.commandEleCode = code;
},
cancelCommand() {
this.initEle = null;
},
handleCurrentChange(val) {
if (!val) { return; }
this.initEle = null;
this.commandEleCode = null;
const step = {
code: `${val.code}`,
operation: OperationEvent.Signal.lock.choose.operation,
param: {}
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.selected = val;
}
}).catch(() => {
this.$refs.noticeInfo.doShow();
});
},
cancel() {
const operate = {

View File

@ -1,17 +1,35 @@
<template>
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="600px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<el-row>
<el-table :data="signalList" height="300px">
<el-table
ref="singleTable"
:data="signalList"
highlight-current-row
height="300px"
@current-change="handleCurrentChange"
>
<el-table-column prop="name" label="信号机" />
<el-table-column prop="blockStatus" label="显示" />
<el-table-column prop="blockProcess" label="可引导" />
<el-table-column prop="unblockProcess" label="引导过程" />
<el-table-column prop="blockStatus" label="显示">
<template slot-scope="scope">
<span>{{ getSignalShow(scope.row.code) }}</span>
</template>
</el-table-column>
<el-table-column prop="blockProcess" label="可引导">
<template slot-scope="scope">
<span>{{ getCanGuide(scope.row.code) }}</span>
</template>
</el-table-column>
<el-table-column prop="unblockProcess" label="引导过程" width="120">
<template slot-scope="scope">
<span>{{ getProcess(scope.row.code) }}</span>
</template>
</el-table-column>
<el-table-column prop="unblockProcess" width="150" label="区间信号引导过程" />
</el-table>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="4" :offset="1">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定(O)</el-button>
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!selected || !selected.callOn" @click="commit">确定(O)</el-button>
</el-col>
<el-col :span="4" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">应用(A)</el-button>
@ -24,6 +42,7 @@
</el-col>
</el-row>
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
<signal-guide ref="signalGuide" @commandSuccess="commandSuccess" @cancelCommand="cancelCommand" />
</el-dialog>
</template>
@ -31,11 +50,13 @@
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
// import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import SignalGuide from './signalGuide';
import { mapGetters } from 'vuex';
export default {
name: 'StandDetain',
components: {
SignalGuide,
NoticeInfo
},
data() {
@ -46,7 +67,9 @@ export default {
dialogShow: false,
loading: false,
selected: null,
operate: ''
operate: '',
initEle: null,
commandEleCode: null
};
},
computed: {
@ -83,6 +106,8 @@ export default {
},
methods: {
doShow(operate, selected) {
this.initEle = null;
this.commandEleCode = null;
this.selected = selected;
this.operate = operate;
//
@ -94,12 +119,79 @@ export default {
doClose() {
this.loading = false;
this.dialogShow = false;
this.$refs.singleTable.setCurrentRow();
this.$store.dispatch('training/emitTipFresh');
},
commit() {
getSignalShow(code) {
const signalEle = this.$store.getters['map/getDeviceByCode'](code);
if (signalEle.redOpen && !signalEle.yellowOpen && !signalEle.greenOpen) {
return '红';
} else if (!signalEle.redOpen && !signalEle.yellowOpen && signalEle.greenOpen) {
return '绿';
} else if (!signalEle.redOpen && signalEle.yellowOpen && !signalEle.greenOpen) {
return '黄';
} else if (signalEle.redOpen && signalEle.yellowOpen && !signalEle.greenOpen) {
return '引导';
} else {
return '';
}
},
handleClick() {
getCanGuide(code) {
const signalEle = this.$store.getters['map/getDeviceByCode'](code);
if (signalEle.callOn) {
return '是';
} else {
return '否';
}
},
getProcess(code) {
if (this.commandEleCode === code) {
return '完成';
} else if (this.initEle && this.initEle.code === code) {
return '等待确认/取消';
} else {
return '';
}
},
commit() {
const step = {
code: `${this.selected.code}`,
operation: OperationEvent.Signal.guide.confirm.operation,
param: {}
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.signalGuide.doShow(step, this.selected);
this.initEle = this.selected;
}
}).catch(() => {
this.$refs.noticeInfo.doShow();
});
},
handleCurrentChange(val) {
if (!val) { return; }
this.initEle = null;
this.commandEleCode = null;
const step = {
code: `${val.code}`,
operation: OperationEvent.Signal.guide.choose.operation,
param: {}
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.selected = val;
}
}).catch(() => {
this.$refs.noticeInfo.doShow();
});
},
commandSuccess(code) {
this.commandEleCode = code;
},
cancelCommand() {
this.initEle = null;
},
cancel() {
const operate = {

View File

@ -1,16 +1,34 @@
<template>
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="600px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="700px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<el-row>
<el-table :data="switchList" height="350px">
<el-table
ref="singleTable"
:data="switchList"
highlight-current-row
height="350px"
@current-change="handleCurrentChange"
>
<el-table-column prop="name" label="道岔" />
<el-table-column prop="blockStatus" label="道岔封锁状态" />
<el-table-column prop="blockProcess" label="设置封锁进程" />
<el-table-column prop="unblockProcess" label="解除封锁进程" />
<el-table-column prop="blockStatus" label="道岔封锁状态">
<template slot-scope="scope">
<span>{{ getSwitchStatus(scope.row.code) }}</span>
</template>
</el-table-column>
<el-table-column prop="blockProcess" label="设置封锁进程">
<template slot-scope="scope">
<span>{{ getProcess(scope.row.code, 'block') }}</span>
</template>
</el-table-column>
<el-table-column prop="unblockProcess" label="解除封锁进程">
<template slot-scope="scope">
<span>{{ getProcess(scope.row.code, 'unblock') }}</span>
</template>
</el-table-column>
</el-table>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="4" :offset="1">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定(O)</el-button>
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!selected || !!initEle" @click="commit">确定(O)</el-button>
</el-col>
<el-col :span="4" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">应用(A)</el-button>
@ -23,19 +41,22 @@
</el-col>
</el-row>
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
<switch-block ref="switchBlock" @commandSuccess="commandSuccess" @cancelCommand="cancelCommand" />
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
// import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import { mapGetters } from 'vuex';
import SwitchBlock from './switchBlock';
export default {
name: 'StandDetain',
components: {
NoticeInfo
NoticeInfo,
SwitchBlock
},
data() {
return {
@ -48,7 +69,9 @@ export default {
mode: '',
position: '',
reserved: '',
operate: ''
operate: '',
initEle: null,
commandEleCode: null
};
},
computed: {
@ -56,7 +79,7 @@ export default {
'switchList'
]),
isBlock() {
return this.operate === OperationEvent.Switch.block.init.operation;
return this.operate && this.operate.operation === OperationEvent.Switch.block.button.operation;
},
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
@ -88,6 +111,8 @@ export default {
},
methods: {
doShow(operate, selected) {
this.initEle = null;
this.commandEleCode = null;
this.selected = selected;
this.operate = operate;
//
@ -99,12 +124,69 @@ export default {
doClose() {
this.loading = false;
this.dialogShow = false;
this.$refs.singleTable.setCurrentRow();
this.$store.dispatch('training/emitTipFresh');
},
commit() {
const step = {
code: `${this.selected.code}`,
operation: this.isBlock ? OperationEvent.Switch.block.confirm.operation : OperationEvent.Switch.unblock.confirm.operation,
param: {}
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.switchBlock.doShow(step, this.selected);
this.initEle = this.selected;
}
}).catch(() => {
this.$refs.noticeInfo.doShow();
});
},
handleClick() {
handleCurrentChange(val) {
if (!val) { return; }
this.initEle = null;
this.commandEleCode = null;
const step = {
code: `${val.code}`,
operation: this.isBlock ? OperationEvent.Switch.block.choose.operation : OperationEvent.Switch.unblock.choose.operation,
param: {}
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.selected = val;
}
}).catch(() => {
this.$refs.noticeInfo.doShow();
});
},
getSwitchStatus(code) {
const switchEle = this.$store.getters['map/getDeviceByCode'](code);
if (this.commandEleCode === code) {
return this.isBlock ? '锁闭的' : '未锁闭的';
}
if (switchEle.blockade) {
return '锁闭的';
} else {
return '未锁闭的';
}
},
getProcess(code, type) {
if (this.commandEleCode && this.commandEleCode === code && ((type === 'block' && this.isBlock) || (type === 'unblock' && !this.isBlock))) {
return this.isBlock ? '已完成封锁' : '已完成解封';
} else if (this.initEle && this.initEle.code === code && ((type === 'block' && this.isBlock) || (type === 'unblock' && !this.isBlock))) {
return '已初始化';
} else {
return '';
}
},
commandSuccess(code) {
this.commandEleCode = code;
this.$refs.singleTable.setCurrentRow();
},
cancelCommand() {
this.initEle = null;
},
cancel() {
const operate = {

View File

@ -33,7 +33,15 @@
<el-col :span="18">
<div class="border-box">
<div class="border-box-title">CBTC</div>
<el-table :data="routeList" height="120px" style="position: relative;top: -15px;">
<!--<el-table :data="routeList" height="120px" style="position: relative;top: -15px;">-->
<el-table
ref="singleTable1"
:data="routeList"
highlight-current-row
style="position: relative;top: -15px;"
height="120px"
@current-change="handleCurrentChange1"
>
<el-table-column prop="name" width="130" label="进路" />
<el-table-column prop="area" label="区域" />
<el-table-column prop="status" label="状态" />
@ -50,9 +58,20 @@
</el-row>
<el-row class="border-box">
<div class="border-box-title">后备</div>
<el-table :data="routeList" height="160px" style="position: relative;top: -15px;">
<el-table
ref="singleTable2"
:data="routeList"
highlight-current-row
style="position: relative;top: -15px;"
height="160px"
@current-change="handleCurrentChange2"
>
<el-table-column prop="name" width="130" label="进路" />
<el-table-column prop="direction" label="运行方向" />
<el-table-column prop="direction" label="运行方向">
<template slot-scope="scope">
<span>{{ getRouteDirection(scope.row) }}</span>
</template>
</el-table-column>
<el-table-column prop="status" label="状态" />
<el-table-column prop="pmi" width="50" label="PMI" />
<el-table-column prop="signalModel" width="80" label="信号模式" />
@ -64,7 +83,15 @@
<el-row>
<div class="border-box">
<div class="border-box-title">CBTC</div>
<el-table :data="routeList" height="120px" style="position: relative;top: -15px;">
<!--<el-table :data="routeList" height="120px" style="position: relative;top: -15px;">-->
<el-table
ref="singleTable3"
:data="routeList"
highlight-current-row
style="position: relative;top: -15px;"
height="120px"
@current-change="handleCurrentChange3"
>
<el-table-column prop="name" width="130" label="进路" />
<el-table-column prop="area" label="区域" />
<el-table-column prop="status" label="状态" />
@ -73,9 +100,21 @@
</el-row>
<el-row class="border-box">
<div class="border-box-title">后备</div>
<el-table :data="routeList" height="160px" style="position: relative;top: -15px;">
<!--<el-table :data="routeList" height="160px" style="position: relative;top: -15px;">-->
<el-table
ref="singleTable4"
:data="routeList"
highlight-current-row
style="position: relative;top: -15px;"
height="160px"
@current-change="handleCurrentChange4"
>
<el-table-column prop="name" width="130" label="进路" />
<el-table-column prop="direction" label="运行方向" />
<el-table-column prop="direction" label="运行方向">
<template slot-scope="scope">
<span>{{ getRouteDirection(scope.row) }}</span>
</template>
</el-table-column>
<el-table-column prop="status" label="状态" />
<el-table-column prop="pmi" width="50" label="PMI" />
<el-table-column prop="signalModel" width="80" label="信号模式" />
@ -83,28 +122,39 @@
<el-input placeholder="PMI进路选择" size="mini" style="position: relative;top: -10px;" />
</el-row>
</el-tab-pane>
<el-tab-pane label="禁止进路" name="third">
<el-row class="border-box">
<el-col :span="18">
<div class="border-box-title">后备</div>
<el-table :data="routeList" height="332px" style="position: relative;top: -15px;">
<el-table-column prop="name" width="130" label="进路" />
<el-table-column prop="direction" label="运行方向" />
<el-table-column prop="status" label="状态" />
<el-table-column prop="pmi" width="50" label="PMI" />
<el-table-column prop="signalModel" width="80" label="信号模式" />
</el-table>
</el-col>
<el-col :span="6">
<div class="radio-box-title">禁止进路</div>
<div class="radio-box">
<el-radio v-model="forbidRoute" :label="true" style="display: block;margin-bottom: 10px;">设置(S)</el-radio>
<el-radio v-model="forbidRoute" :label="false" style="display: block;">取消(N)</el-radio>
</div>
</el-col>
<el-input placeholder="PMI进路选择" size="mini" style="position: relative;top: -10px;" />
</el-row>
</el-tab-pane>
<!--<el-tab-pane label="禁止进路" name="third">-->
<!--<el-row class="border-box">-->
<!--<el-col :span="18">-->
<!--<div class="border-box-title">后备</div>-->
<!--<el-table-->
<!--ref="singleTable5"-->
<!--:data="routeList"-->
<!--highlight-current-row-->
<!--style="position: relative;top: -15px;"-->
<!--height="332px"-->
<!--@current-change="handleCurrentChange5"-->
<!--&gt;-->
<!--<el-table-column prop="name" width="130" label="进路" />-->
<!--<el-table-column prop="direction" label="运行方向">-->
<!--<template slot-scope="scope">-->
<!--<span>{{ getRouteDirection(scope.row) }}</span>-->
<!--</template>-->
<!--</el-table-column>-->
<!--<el-table-column prop="status" label="状态" />-->
<!--<el-table-column prop="pmi" width="50" label="PMI" />-->
<!--<el-table-column prop="signalModel" width="80" label="信号模式" />-->
<!--</el-table>-->
<!--</el-col>-->
<!--<el-col :span="6">-->
<!--<div class="radio-box-title">禁止进路</div>-->
<!--<div class="radio-box">-->
<!--<el-radio v-model="forbidRoute" :label="true" style="display: block;margin-bottom: 10px;">设置(S)</el-radio>-->
<!--<el-radio v-model="forbidRoute" :label="false" style="display: block;">取消(N)</el-radio>-->
<!--</div>-->
<!--</el-col>-->
<!--<el-input placeholder="PMI进路选择" size="mini" style="position: relative;top: -10px;" />-->
<!--</el-row>-->
<!--</el-tab-pane>-->
</el-tabs>
</el-col>
</el-row>
@ -131,6 +181,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
// import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import { mapGetters } from 'vuex';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'SwitchActive',
@ -149,7 +200,7 @@ export default {
activeName: 'first',
tempData: [],
checked: false,
unlockType: '',
unlockType: 'auto',
forbidRoute: false
};
},
@ -199,11 +250,118 @@ export default {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.$refs.singleTable1.setCurrentRow();
this.$refs.singleTable2.setCurrentRow();
this.$refs.singleTable3.setCurrentRow();
this.$refs.singleTable4.setCurrentRow();
},
commit() {
const step = {
over: true,
param: {routeCode: this.selected.code, signalCode: this.selected.startSignalCode}
};
if (this.activeName === 'first') {
if (this.unlockType === 'auto') {
step.operation = OperationEvent.Signal.atsAutoControl.confirm.operation;
step.cmdType = CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING;
} else if (this.unlockType === 'artificial') {
step.operation = OperationEvent.Signal.humanControl.confirm.operation;
step.cmdType = CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING;
}
} else if (this.activeName === 'second') {
step.operation = OperationEvent.Signal.cancelTrainRoute.confirm.operation;
step.cmdType = CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE;
}
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.doClose();
}
}).catch((error) => {
this.$refs.noticeInfo.doShow();
});
},
handleClick() {
handleCurrentChange1(val) {
this.$refs.singleTable2.setCurrentRow();
this.$refs.singleTable1.setCurrentRow(val);
if (!val) { return; }
const step = {
code: `${val.code}`,
operation: OperationEvent.Signal.atsAutoControl.choose.operation,
param: {}
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.selected = val;
}
}).catch(() => {
this.$refs.noticeInfo.doShow();
});
},
handleCurrentChange2(val) {
this.$refs.singleTable1.setCurrentRow();
this.$refs.singleTable2.setCurrentRow(val);
if (!val) { return; }
const step = {
code: `${val.code}`,
operation: OperationEvent.Signal.atsAutoControl.choose.operation,
param: {}
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.selected = val;
}
}).catch(() => {
this.$refs.noticeInfo.doShow();
});
},
handleCurrentChange3(val) {
this.$refs.singleTable4.setCurrentRow();
this.$refs.singleTable3.setCurrentRow(val);
if (!val) { return; }
const step = {
code: `${val.code}`,
operation: OperationEvent.Signal.cancelTrainRoute.choose.operation,
param: {}
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.selected = val;
}
}).catch(() => {
this.$refs.noticeInfo.doShow();
});
},
handleCurrentChange4(val) {
this.$refs.singleTable3.setCurrentRow();
this.$refs.singleTable4.setCurrentRow(val);
const step = {
code: `${val.code}`,
operation: OperationEvent.Signal.cancelTrainRoute.choose.operation,
param: {}
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.selected = val;
}
}).catch(() => {
this.$refs.noticeInfo.doShow();
});
},
handleCurrentChange5(val) {
},
getRouteDirection(route) {
const signalEle = this.$store.getters['map/getDeviceByCode'](route.startSignalCode);
if (signalEle.right) {
return '0';
} else {
return '1';
}
},
cancel() {
const operate = {

View File

@ -2,27 +2,43 @@
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="1000px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<el-row>
<el-col :span="18">
<el-table :data="sectionList" highlight-current-row height="300px" @current-change="selectLine">
<el-table ref="singleTable1" :data="tempData" highlight-current-row height="300px" @current-change="selectLine1">
<el-table-column prop="name" label="轨道" />
<el-table-column prop="blockStatus" label="MAU" />
<el-table-column prop="blockProcess" label="临时限速" />
<el-table-column prop="unblockProcess" label="PM临时限速" width="110" />
<el-table-column prop="blockProcess" label="设置临时限速进程" width="140" />
<el-table-column prop="blockStatus" width="120" label="MAU">
<template slot-scope="scope">
<span>{{ getStationName(scope.row) }}</span>
</template>
</el-table-column>
<el-table-column prop="blockProcess" width="80" label="临时限速">
<template slot-scope="scope">
<span>{{ getLimitSpeed(scope.row.code) }}</span>
</template>
</el-table-column>
<el-table-column prop="unblockProcess" label="PM临时限速" width="110">
<template slot-scope="scope">
<span>{{ getIsLimit(scope.row.code) }}</span>
</template>
</el-table-column>
<el-table-column prop="blockProcess" label="设置临时限速进程" width="140">
<template slot-scope="scope">
<span>{{ getProcess(scope.row.code) }}</span>
</template>
</el-table-column>
<el-table-column prop="unblockProcess" label="用户里程起点" width="110" />
<el-table-column prop="unblockProcess" label="用户里程终点" width="110" />
</el-table>
</el-col>
<el-col :span="3">
<el-table :data="limitList" highlight-current-row height="300px" @current-change="selectLine">
<el-table ref="singleTable2" :data="limitList" highlight-current-row height="300px" @current-change="selectLine2">
<el-table-column prop="name" label="速度" />
</el-table>
</el-col>
<el-col v-if="selectShow" :span="3">
<el-col :span="3">
<fieldset style="padding-left: 10px;">
<legend class="card_title">命令</legend>
<el-radio-group v-model="radio">
<el-radio label="1" style="margin-bottom: 10px;">确认(F)</el-radio>
<el-radio label="2">取消(N)</el-radio>
<el-radio-group v-model="command">
<el-radio :label="true" style="margin-bottom: 10px;">确认(F)</el-radio>
<el-radio :label="false">取消(N)</el-radio>
</el-radio-group>
</fieldset>
</el-col>
@ -32,7 +48,7 @@
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定(O)</el-button>
</el-col>
<el-col :span="4" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">应用(A)</el-button>
<el-button :id="domIdConfirm" type="primary" :loading="loading">应用(A)</el-button>
</el-col>
<el-col :span="4" :offset="2">
<el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button>
@ -50,6 +66,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
// import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import { mapGetters } from 'vuex';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'SwitchActive',
@ -65,10 +82,11 @@ export default {
loading: false,
selected: null,
active: false,
selectShow: false,
activeName: 'first',
tempData: [],
radio: '1',
command: true,
operate: null,
speedLimitValue: 0,
limitList: [
{ name: '5', value: 5 },
{ name: '10', value: 10 },
@ -122,11 +140,21 @@ export default {
});
},
methods: {
doShow(operate, selected) {
doShow(operate, selected, value) {
this.tempData = [];
this.sectionList.forEach(item => {
if (item.type === '01' || item.type === '04') {
this.tempData.push(item);
}
});
this.selected = selected;
//
this.operate = operate;
this.speedLimitValue = value;
this.dialogShow = true;
this.$nextTick(function () {
this.$refs.singleTable1.setCurrentRow(selected);
this.$refs.singleTable2.setCurrentRow(this.limitList[value / 5 - 1]);
this.$store.dispatch('training/emitTipFresh');
});
},
@ -135,14 +163,46 @@ export default {
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
selectLine(val) {
// console.log(val);
this.selectShow = true;
selectLine1(val) {
this.$refs.singleTable1.setCurrentRow(this.selected);
},
selectLine2(val) {
this.$refs.singleTable2.setCurrentRow(this.limitList[this.speedLimitValue / 5 - 1]);
},
getStationName(val) {
const stationElm = this.$store.getters['map/getDeviceByCode'](val.stationCode);
return stationElm.name;
},
getIsLimit(code) {
const sectionEle = this.$store.getters['map/getDeviceByCode'](code);
return sectionEle.speedUpLimit > 0 ? '开启' : '关闭';
},
getLimitSpeed(code) {
const sectionEle = this.$store.getters['map/getDeviceByCode'](code);
return sectionEle.speedUpLimit > 0 ? sectionEle.speedUpLimit : 0;
},
getProcess(code) {
if (this.selected && this.selected.code === code) {
return '等待确认/取消';
} else {
return '';
}
},
commit() {
},
handleClick() {
const operate = {
cmdType: this.command ? CMD.Section.CMD_SECTION_SET_LIMIT_SPEED : CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED,
operation: this.command ? OperationEvent.Section.setSpeed.confirm1.operation : OperationEvent.Section.cancelSpeed.confirm1.operation,
over: true,
param: {sectionCode: this.selected.code, speedLimitValue:this.speedLimitValue}
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
this.$emit('commandSuccess', this.selected.code, this.command ? this.speedLimitValue : 0);
}
}).catch(() => {
this.$refs.noticeInfo.doShow();
});
},
cancel() {
const operate = {

View File

@ -2,19 +2,31 @@
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="700px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<el-row>
<el-col :span="18">
<el-table :data="sectionList" highlight-current-row height="300px" @current-change="selectLine">
<el-table ref="singleTable" :data="tempData" highlight-current-row height="300px" @current-change="selectLine">
<el-table-column prop="name" label="轨道" />
<el-table-column prop="blockStatus" label="MAU" />
<el-table-column prop="blockProcess" label="状态" />
<el-table-column prop="unblockProcess" label="打开进程" />
<el-table-column prop="blockStatus" label="MAU">
<template slot-scope="scope">
<span>{{ getStationName(scope.row) }}</span>
</template>
</el-table-column>
<el-table-column prop="blockProcess" width="150" label="状态">
<template slot-scope="scope">
<span>{{ getSectionStatus(scope.row.code) }}</span>
</template>
</el-table-column>
<el-table-column prop="unblockProcess" :label="isBlock?'关闭进程':'打开进程'">
<template slot-scope="scope">
<span>{{ getProcess(scope.row.code) }}</span>
</template>
</el-table-column>
</el-table>
</el-col>
<el-col v-if="selectShow" :span="5" :offset="1">
<el-col :span="5" :offset="1">
<fieldset>
<legend class="card_title">命令</legend>
<el-radio-group v-model="radio">
<el-radio label="1" style="margin-bottom: 10px;">确认(F)</el-radio>
<el-radio label="2">取消(N)</el-radio>
<el-radio-group v-model="command">
<el-radio :label="true" style="margin-bottom: 10px;">确认(F)</el-radio>
<el-radio :label="false">取消(N)</el-radio>
</el-radio-group>
</fieldset>
</el-col>
@ -42,6 +54,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
// import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import { mapGetters } from 'vuex';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'SwitchActive',
@ -57,16 +70,20 @@ export default {
loading: false,
selected: null,
active: false,
selectShow: false,
activeName: 'first',
tempData: [],
radio: '1'
radio: '1',
operate: {},
command: true
};
},
computed: {
...mapGetters('map', [
'sectionList'
]),
isBlock() {
return !!this.operate && this.operate.operation === OperationEvent.Section.lock.confirm.operation;
},
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
@ -80,7 +97,7 @@ export default {
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menu.domId : '';
},
title() {
return '初始化开放轨道';
return this.isBlock ? '初始化关闭轨道' : '初始化开放轨道';
}
},
watch: {
@ -97,10 +114,17 @@ export default {
},
methods: {
doShow(operate, selected) {
this.tempData = [];
this.sectionList.forEach(item => {
if (item.type === '01' || item.type === '04') {
this.tempData.push(item);
}
});
this.selected = selected;
//
this.operate = operate;
this.dialogShow = true;
this.$nextTick(function () {
this.$refs.singleTable.setCurrentRow(this.selected);
this.$store.dispatch('training/emitTipFresh');
});
},
@ -110,13 +134,42 @@ export default {
this.$store.dispatch('training/emitTipFresh');
},
selectLine(val) {
// console.log(val);
this.selectShow = true;
this.$refs.singleTable.setCurrentRow(this.selected);
},
getProcess(code) {
if (this.selected && this.selected.code === code) {
return '等待确认/取消';
} else {
return '';
}
},
getStationName(val) {
const stationElm = this.$store.getters['map/getDeviceByCode'](val.stationCode);
return stationElm.name;
},
getSectionStatus(code) {
const sectionElm = this.$store.getters['map/getDeviceByCode'](code);
return sectionElm.blockade ? '关闭双向:所有列车' : '打开';
},
commit() {
},
handleClick() {
if (this.command) {
const operate = {
cmdType: this.isBlock ? CMD.Section.CMD_SECTION_BLOCK : CMD.Section.CMD_SECTION_UNBLOCK,
operation: this.isBlock ? OperationEvent.Section.lock.confirm1.operation : OperationEvent.Section.unlock.confirm1.operation,
over: true,
param: {sectionCode: this.selected.code}
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
this.$emit('commandSuccess', this.selected.code);
}
}).catch(() => {
this.$refs.noticeInfo.doShow();
});
} else {
this.cancel();
}
},
cancel() {
const operate = {

View File

@ -2,32 +2,48 @@
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="700px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<el-row>
<el-col :span="24">
<el-table :data="sectionList" highlight-current-row height="300px" @current-change="selectLine">
<el-table-column prop="name" label="轨道" />
<el-table-column prop="blockStatus" label="MAU" />
<el-table-column prop="blockProcess" label="状态" />
<el-table-column prop="unblockProcess" label="临时限速" />
<el-table-column prop="unblockProcess" label="PM临时限速" />
<el-table :data="tempData" highlight-current-row height="350px" @current-change="selectLine">
<el-table-column prop="name" width="100" label="轨道" />
<el-table-column prop="blockStatus" width="120" label="MAU">
<template slot-scope="scope">
<span>{{ getStationName(scope.row) }}</span>
</template>
</el-table-column>
<el-table-column prop="blockProcess" width="150" label="状态">
<template slot-scope="scope">
<span>{{ getSectionStatus(scope.row) }}</span>
</template>
</el-table-column>
<el-table-column prop="unblockProcess" label="临时限速">
<template slot-scope="scope">
<span>{{ getLimitSpeed(scope.row.code) }}</span>
</template>
</el-table-column>
<el-table-column prop="unblockProcess" width="100" label="PM临时限速">
<template slot-scope="scope">
<span>{{ getIsLimit(scope.row.code) }}</span>
</template>
</el-table-column>
<el-table-column prop="unblockProcess" label="站台" />
<el-table-column prop="unblockProcess" label="闭塞区段" />
<el-table-column prop="unblockProcess" label="打开进程" />
<el-table-column prop="unblockProcess" label="关闭进程" />
<el-table-column prop="unblockProcess" label="设置临时限速进程" />
<el-table-column prop="unblockProcess" label="清除临时限速进程" />
<el-table-column prop="unblockProcess" label="用户里程起点" />
<el-table-column prop="unblockProcess" label="用户里程终点" />
<el-table-column prop="unblockProcess" width="140" label="设置临时限速进程" />
<el-table-column prop="unblockProcess" width="140" label="清除临时限速进程" />
<el-table-column prop="unblockProcess" width="120" label="用户里程起点" />
<el-table-column prop="unblockProcess" width="120" label="用户里程终点" />
</el-table>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="4" :offset="5">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">打印(P)</el-button>
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="true">打印(P)</el-button>
</el-col>
<el-col :span="4" :offset="2">
<el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button>
</el-col>
<el-col :span="4" :offset="2">
<el-button>帮助(H)</el-button>
<el-button :disabled="true">帮助(H)</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
@ -94,6 +110,12 @@ export default {
},
methods: {
doShow(operate, selected) {
this.tempData = [];
this.sectionList.forEach(item => {
if (item.type === '01' || item.type === '04') {
this.tempData.push(item);
}
});
this.selected = selected;
//
this.dialogShow = true;
@ -112,8 +134,21 @@ export default {
},
commit() {
},
handleClick() {
getStationName(val) {
const stationElm = this.$store.getters['map/getDeviceByCode'](val.stationCode);
return stationElm.name;
},
getLimitSpeed(code) {
const sectionEle = this.$store.getters['map/getDeviceByCode'](code);
return sectionEle.speedUpLimit > 0 ? sectionEle.speedUpLimit : 0;
},
getSectionStatus(val) {
const sectionEle = this.$store.getters['map/getDeviceByCode'](val.code);
return sectionEle.blockade ? '关闭双向:所有列车' : '打开';
},
getIsLimit(code) {
const sectionEle = this.$store.getters['map/getDeviceByCode'](code);
return sectionEle.speedUpLimit > 0 ? '开启' : '关闭';
},
cancel() {
const operate = {

View File

@ -2,17 +2,35 @@
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="750px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<el-row>
<el-col :span="18">
<el-table :data="signalList" height="350px">
<el-table
ref="singleTable"
:data="signalList"
highlight-current-row
height="350px"
@current-change="handleCurrentChange"
>
<el-table-column prop="name" label="信号机" />
<el-table-column prop="status" label="信号机封锁状态" />
<el-table-column prop="status" label="设置封锁进程" />
<el-table-column prop="status" label="解除封锁进程" />
<el-table-column prop="status" label="信号机封锁状态">
<template slot-scope="scope">
<span>{{ getSignalStatus(scope.row.code) }}</span>
</template>
</el-table-column>
<el-table-column prop="blockProcess" label="设置封锁进程">
<template slot-scope="scope">
<span>{{ getProcess(scope.row.code, 'lock') }}</span>
</template>
</el-table-column>
<el-table-column prop="unblockProcess" label="解除封锁进程">
<template slot-scope="scope">
<span>{{ getProcess(scope.row.code, 'unlock') }}</span>
</template>
</el-table-column>
</el-table>
</el-col>
<el-col :span="5" :offset="1">
<div class="set-status-title">命令</div>
<div class="set-status-box">
<el-radio v-model="command" :disabled="true" :label="true">确认</el-radio>
<el-radio v-model="command" :label="true">确认</el-radio>
<br>
<el-radio v-model="command" :label="false">取消</el-radio>
</div>
@ -41,6 +59,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
// import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import { mapGetters } from 'vuex';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'SignalBlock',
@ -55,13 +74,17 @@ export default {
dialogShow: false,
loading: false,
selected: null,
operate: {}
operate: {},
title: ''
};
},
computed: {
...mapGetters('map', [
'signalList'
]),
isBlock() {
return this.operate && this.operate.operation === OperationEvent.Signal.lock.confirm.operation;
},
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
@ -73,10 +96,10 @@ export default {
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menu.domId : '';
},
title() {
return this.operate.operation === OperationEvent.Signal.lock.menu.operation ? '确认/取消信号机封锁' : '确认/取消信号机解除封锁';
}
// title() {
// return this.operate.operation === OperationEvent.Signal.lock.menu.operation ? '/' : '/';
// }
},
watch: {
'$store.state.map.keyboardEnterCount': function (val) {
@ -95,8 +118,10 @@ export default {
this.selected = selected;
this.operate = operate;
//
this.title = this.operate && this.operate.operation === OperationEvent.Switch.block.confirm.operation ? '确认/取消信号机封锁' : '确认/取消信号机解除封锁';
this.dialogShow = true;
this.$nextTick(function () {
this.$refs.singleTable.setCurrentRow(selected);
this.$store.dispatch('training/emitTipFresh');
});
},
@ -106,9 +131,42 @@ export default {
this.$store.dispatch('training/emitTipFresh');
},
commit() {
if (this.command) {
const operate = {
cmdType: this.isBlock ? CMD.Signal.CMD_SIGNAL_BLOCK : CMD.Signal.CMD_SIGNAL_UNBLOCK,
operation: this.isBlock ? OperationEvent.Signal.lock.confirm1.operation : OperationEvent.Signal.unlock.confirm1.operation,
over: true,
param: {signalCode: this.selected.code}
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
this.$emit('commandSuccess', this.selected.code);
}
}).catch(() => {
this.$refs.noticeInfo.doShow();
});
} else {
this.cancel();
}
},
handleClick() {
handleCurrentChange(val) {
this.$refs.singleTable.setCurrentRow(this.selected);
},
getSignalStatus(code) {
const signalEle = this.$store.getters['map/getDeviceByCode'](code);
if (signalEle.blockade) {
return '锁闭的';
} else {
return '未设锁闭';
}
},
getProcess(code, type) {
if (this.selected.code === code && ((type === 'lock' && this.isBlock) || (type === 'unlock' && !this.isBlock))) {
return '等待确认/取消';
} else {
return '';
}
},
cancel() {
const operate = {
@ -116,6 +174,7 @@ export default {
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$emit('cancelCommand');
this.doClose();
}
}).catch(() => {

View File

@ -1,19 +1,33 @@
<template>
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="600px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="700px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<el-row>
<el-col :span="18">
<el-table :data="signalList" height="300px">
<el-table
ref="singleTable"
:data="signalList"
highlight-current-row
height="300px"
@current-change="handleCurrentChange"
>
<el-table-column prop="name" label="信号机" />
<el-table-column prop="blockStatus" label="允许锁闭" />
<el-table-column prop="blockProcess" label="同意取消" />
<el-table-column prop="unblockProcess" label="取消进程" />
<el-table-column prop="blockStatus" label="允许锁闭">
<template slot-scope="scope">
<span>{{ getSignalBlock(scope.row.code) }}</span>
</template>
</el-table-column>
<el-table-column prop="blockProcess" label="同意取消"></el-table-column>
<el-table-column prop="unblockProcess" label="取消进程">
<template slot-scope="scope">
<span>{{ getProcess(scope.row.code) }}</span>
</template>
</el-table-column>
</el-table>
</el-col>
<el-col :span="6">
<div class="radio-box-title">命令</div>
<div class="radio-box">
<el-radio v-model="command" label="normal" style="display: block;margin-bottom: 10px;">确认</el-radio>
<el-radio v-model="command" label="reverse" style="display: block;">取消</el-radio>
<el-radio v-model="command" :label="true" style="display: block;margin-bottom: 10px;">确认</el-radio>
<el-radio v-model="command" :label="false" style="display: block;">取消</el-radio>
</div>
</el-col>
</el-row>
@ -40,6 +54,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
// import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import { mapGetters } from 'vuex';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'SignalCanBlock',
@ -55,7 +70,7 @@ export default {
loading: false,
selected: null,
operate: '',
command: ''
command: true
};
},
computed: {
@ -97,6 +112,7 @@ export default {
//
this.dialogShow = true;
this.$nextTick(function () {
this.$refs.singleTable.setCurrentRow(selected);
this.$store.dispatch('training/emitTipFresh');
});
},
@ -106,9 +122,38 @@ export default {
this.$store.dispatch('training/emitTipFresh');
},
commit() {
const operate = {
cmdType: this.command ? CMD.Signal.CMD_SIGNAL_BLOCK : CMD.Signal.CMD_SIGNAL_UNBLOCK,
operation: this.command ? OperationEvent.Signal.lock.confirm1.operation : OperationEvent.Signal.unlock.confirm1.operation,
over: true,
param: {signalCode: this.selected.code}
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
this.$emit('commandSuccess', this.selected.code);
}
}).catch(() => {
this.$refs.noticeInfo.doShow();
});
},
handleClick() {
handleCurrentChange(val) {
this.$refs.singleTable.setCurrentRow(this.selected);
},
getSignalBlock(code) {
const signalEle = this.$store.getters['map/getDeviceByCode'](code);
if (signalEle.blockade) {
return '关闭';
} else {
return '开启';
}
},
getProcess(code) {
if (this.selected && this.selected.code === code) {
return '等待确认/取消';
} else {
return '';
}
},
cancel() {
const operate = {

View File

@ -3,7 +3,11 @@
<el-row>
<el-table :data="signalList" height="350px">
<el-table-column prop="name" label="信号机" />
<el-table-column prop="status" label="显示" />
<el-table-column prop="show" label="显示">
<template slot-scope="scope">
<span>{{ getSignalShow(scope.row.code) }}</span>
</template>
</el-table-column>
<el-table-column prop="status" label="错误代码" />
<el-table-column prop="status" label="引导过程" />
<el-table-column prop="status" width="160" label="区间信号机引导过程" />
@ -14,20 +18,24 @@
<el-table-column prop="allowSpeed" label="允许速度" />
<el-table-column prop="canOrdered" label="可命令" />
<el-table-column prop="confirmProcess" label="确认进程" />
<el-table-column prop="signalBlockState" width="160" label="信号机封锁状态" />
<el-table-column prop="status" label="信号机封锁状态">
<template slot-scope="scope">
<span>{{ getSignalStatus(scope.row.code) }}</span>
</template>
</el-table-column>
<el-table-column prop="setBlockProcess" width="160" label="信号机封锁进程" />
<el-table-column prop="cancelBlockProcess" width="160" label="解除封锁进程" />
</el-table>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="6" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">打印(P)</el-button>
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="true" @click="commit">打印(P)</el-button>
</el-col>
<el-col :span="6" :offset="2">
<el-button :id="domIdCancel" @click="cancel">关闭(C)</el-button>
</el-col>
<el-col :span="6" :offset="2">
<el-button>帮助(H)</el-button>
<el-button :disabled="true">帮助(H)</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
@ -111,8 +119,27 @@ export default {
}
});
},
handleClick() {
getSignalStatus(code) {
const signalEle = this.$store.getters['map/getDeviceByCode'](code);
if (signalEle.blockade) {
return '锁闭的';
} else {
return '未设锁闭';
}
},
getSignalShow(code) {
const signalEle = this.$store.getters['map/getDeviceByCode'](code);
if (signalEle.redOpen && !signalEle.yellowOpen && !signalEle.greenOpen) {
return '红';
} else if (!signalEle.redOpen && !signalEle.yellowOpen && signalEle.greenOpen) {
return '绿';
} else if (!signalEle.redOpen && signalEle.yellowOpen && !signalEle.greenOpen) {
return '黄';
} else if (signalEle.redOpen && signalEle.yellowOpen && !signalEle.greenOpen) {
return '引导';
} else {
return '';
}
},
cancel() {
const operate = {

View File

@ -2,19 +2,37 @@
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="600px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<el-row>
<el-col :span="18">
<el-table :data="signalList" height="300px">
<el-table
ref="singleTable"
:data="signalList"
highlight-current-row
height="300px"
@current-change="handleCurrentChange"
>
<el-table-column prop="name" label="信号机" />
<el-table-column prop="blockStatus" label="显示" />
<el-table-column prop="blockProcess" label="可引导" />
<el-table-column prop="unblockProcess" label="引导过程" />
<el-table-column prop="blockStatus" label="显示">
<template slot-scope="scope">
<span>{{ getSignalShow(scope.row.code) }}</span>
</template>
</el-table-column>
<el-table-column prop="blockProcess" label="可引导">
<template slot-scope="scope">
<span>{{ getCanGuide(scope.row.code) }}</span>
</template>
</el-table-column>
<el-table-column prop="unblockProcess" label="引导过程" width="120">
<template slot-scope="scope">
<span>{{ getProcess(scope.row.code) }}</span>
</template>
</el-table-column>
<el-table-column prop="unblockProcess" width="150" label="区间信号引导过程" />
</el-table>
</el-col>
<el-col :span="6">
<div class="radio-box-title">命令</div>
<div class="radio-box">
<el-radio v-model="command" label="normal" style="display: block;margin-bottom: 10px;">确认</el-radio>
<el-radio v-model="command" label="reverse" style="display: block;">取消</el-radio>
<el-radio v-model="command" :label="true" style="display: block;margin-bottom: 10px;">确认</el-radio>
<el-radio v-model="command" :label="false" style="display: block;">取消</el-radio>
</div>
</el-col>
</el-row>
@ -41,6 +59,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
// import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import { mapGetters } from 'vuex';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'SignalGuide',
@ -55,7 +74,7 @@ export default {
dialogShow: false,
loading: false,
selected: null,
command: '',
command: true,
operate: ''
};
},
@ -98,6 +117,7 @@ export default {
//
this.dialogShow = true;
this.$nextTick(function () {
this.$refs.singleTable.setCurrentRow(selected);
this.$store.dispatch('training/emitTipFresh');
});
},
@ -107,9 +127,52 @@ export default {
this.$store.dispatch('training/emitTipFresh');
},
commit() {
const operate = {
cmdType: this.command ? CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE : CMD.Signal.CMD_SIGNAL_CANCEL_GUIDE,
operation: this.command ? OperationEvent.Signal.guide.confirm1.operation : OperationEvent.Signal.cancelGuide.confirm1.operation,
over: true,
param: {signalCode: this.selected.code}
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
this.$emit('commandSuccess', this.selected.code);
}
}).catch(() => {
this.$refs.noticeInfo.doShow();
});
},
handleClick() {
getSignalShow(code) {
const signalEle = this.$store.getters['map/getDeviceByCode'](code);
if (signalEle.redOpen && !signalEle.yellowOpen && !signalEle.greenOpen) {
return '红';
} else if (!signalEle.redOpen && !signalEle.yellowOpen && signalEle.greenOpen) {
return '绿';
} else if (!signalEle.redOpen && signalEle.yellowOpen && !signalEle.greenOpen) {
return '黄';
} else if (signalEle.redOpen && signalEle.yellowOpen && !signalEle.greenOpen) {
return '引导';
} else {
return '';
}
},
getCanGuide(code) {
const signalEle = this.$store.getters['map/getDeviceByCode'](code);
if (signalEle.callOn) {
return '是';
} else {
return '否';
}
},
getProcess(code) {
if (this.selected && this.selected.code === code) {
return '等待确认/取消';
} else {
return '';
}
},
handleCurrentChange(val) {
this.$refs.singleTable.setCurrentRow(this.selected);
},
cancel() {
const operate = {
@ -117,6 +180,7 @@ export default {
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$emit('cancelCommand');
this.doClose();
}
}).catch(() => {

View File

@ -2,10 +2,18 @@
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="600px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<el-row>
<el-col :span="16">
<el-table :data="stationStandList" height="350px">
<el-table
ref="singleTable"
:data="stationStandList"
highlight-current-row
height="350px"
@current-change="handleCurrentChange"
>
<el-table-column prop="name" label="站台" />
<el-table-column prop="groupNumber" label="状态">
<span>打开</span>
<template slot-scope="scope">
<span>{{ getStandStatus(scope.row.code) }}</span>
</template>
</el-table-column>
</el-table>
</el-col>
@ -16,7 +24,7 @@
<br>
<el-radio v-model="status" :disabled="!standStatus" :label="false">关闭</el-radio>
</div>
<el-checkbox v-model="allChecked" style="position: relative; top: 220px;">所有站台(F)</el-checkbox>
<el-checkbox v-model="allChecked" :disabled="true" style="position: relative; top: 220px;">所有站台(F)</el-checkbox>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
@ -40,8 +48,8 @@
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
// import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import { mapGetters } from 'vuex';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'StandControl',
@ -102,12 +110,51 @@ export default {
doClose() {
this.loading = false;
this.dialogShow = false;
this.$refs.singleTable.setCurrentRow();
this.$store.dispatch('training/emitTipFresh');
},
commit() {
const step = {
over: true,
cmdType:this.status ? CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP : CMD.Stand.CMD_STAND_SET_JUMP_STOP,
operation:this.status ? OperationEvent.StationStand.cancelJumpStop.confirm.operation : OperationEvent.StationStand.setJumpStop.confirm.operation,
param: {standCode: this.selected.code}
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.doClose();
}
}).catch((error) => {
this.$refs.noticeInfo.doShow();
});
},
handleClick() {
getStandStatus(code) {
const standEle = this.$store.getters['map/getDeviceByCode'](code);
if (standEle.allSkip) {
return '关闭';
} else {
return '打开';
}
},
handleCurrentChange(val) {
if (!val) { return; }
const standEle = this.$store.getters['map/getDeviceByCode'](val.code);
const step = {
code: `${val.code}`,
operation:standEle.allSkip ? OperationEvent.StationStand.setJumpStop.choose.operation : OperationEvent.StationStand.cancelJumpStop.choose.operation,
param: {}
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.selected = val;
this.standStatus = !standEle.allSkip;
this.status = !!standEle.allSkip;
}
}).catch(() => {
this.$refs.noticeInfo.doShow();
});
},
cancel() {
const operate = {

View File

@ -1,15 +1,23 @@
<template>
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="600px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="800px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<el-row style="width: 100%;overflow-x: auto;">
<el-table :data="stationStandList" border height="350px">
<el-table :data="stationStandList" height="350px">
<el-table-column prop="name" width="80" label="站台" />
<el-table-column prop="status" width="80" label="状态" />
<el-table-column prop="minTime" width="130" label="最小停站时间" />
<el-table-column prop="time" width="130" label="规定停站时间" />
<el-table-column prop="maxTime" width="130" label="最大停站时间" />
<el-table-column prop="hold" width="80" label="扣车" />
<el-table-column prop="status" width="80" label="状态">打开</el-table-column>
<el-table-column prop="minTime" width="110" label="最小停站时间" />
<el-table-column prop="parkingTime" width="110" label="规定停站时间">
<template slot-scope="scope">
<span>{{ getParkingTime(scope.row.code) }}</span>
</template>
</el-table-column>
<el-table-column prop="maxTime" width="110" label="最大停站时间" />
<el-table-column prop="detain" label="扣车">
<template slot-scope="scope">
<span>{{ getDetainStatus(scope.row.code) }}</span>
</template>
</el-table-column>
<el-table-column prop="section" width="80" label="轨道" />
<el-table-column prop="parkTime" width="130" label="当前停站时间" />
<el-table-column prop="parkTime" width="110" label="当前停站时间" />
<el-table-column prop="emergencyButton" width="80" label="紧急按钮" />
<el-table-column prop="setting" width="80" label="门设置" />
<el-table-column prop="bypass" width="80" label="门旁路" />
@ -101,6 +109,18 @@ export default {
},
handleClick() {
},
getDetainStatus(code) {
const stand = this.$store.getters['map/getDeviceByCode'](code);
if (!stand.stationHoldTrain && !stand.centerHoldTrain) {
return '未扣车';
} else {
return '扣车';
}
},
getParkingTime(code) {
const stand = this.$store.getters['map/getDeviceByCode'](code);
return stand.parkingTime;
},
cancel() {
const operate = {

View File

@ -4,7 +4,13 @@
<el-col :span="16">
<el-tabs type="border-card">
<el-tab-pane label="站台">
<el-table :data="stationStandList" height="350px">
<el-table
ref="singleTable"
:data="stationStandList"
highlight-current-row
height="350px"
@current-change="handleCurrentChange"
>
<el-table-column prop="name" label="站台" />
<el-table-column prop="detain" label="扣车">
<template slot-scope="scope">
@ -19,7 +25,7 @@
<!--</template>-->
</el-table-column>
</el-table>
<el-checkbox v-model="allChecked">所有站台(F)</el-checkbox>
<el-checkbox v-model="allChecked" :disabled="true">所有站台(F)</el-checkbox>
</el-tab-pane>
<el-tab-pane label="系统">系统</el-tab-pane>
</el-tabs>
@ -35,7 +41,7 @@
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="4" :offset="1">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定(O)</el-button>
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!selected" @click="commit">确定(O)</el-button>
</el-col>
<el-col :span="4" :offset="2">
<el-button>应用(A)</el-button>
@ -54,7 +60,7 @@
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
// import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import { mapGetters } from 'vuex';
export default {
@ -97,6 +103,18 @@ export default {
if (this.show) {
this.commit();
}
},
selected(val) {
if (val) {
const stand = this.$store.getters['map/getDeviceByCode'](val.code);
if (stand && !stand.stationHoldTrain && !stand.centerHoldTrain) {
this.status = true;
this.standStatus = false;
} else {
this.status = false;
this.standStatus = true;
}
}
}
},
mounted() {
@ -119,12 +137,32 @@ export default {
doClose() {
this.loading = false;
this.dialogShow = false;
this.$refs.singleTable.setCurrentRow();
this.$store.dispatch('training/emitTipFresh');
},
commit() {
let cmdCommand = menuOperate.StationStand.setDetainTrain;
if (this.standStatus) {
cmdCommand = menuOperate.StationStand.cancelDetainTrain;
}
commitOperate(cmdCommand, {standCode: this.selected.code}, 3).then((valid)=>{
if (valid) {
this.doClose();
}
});
},
handleClick() {
handleCurrentChange(val) {
if (!val) { return; }
const stand = this.$store.getters['map/getDeviceByCode'](val.code);
let cmdCommand = menuOperate.StationStand.cancelDetainTrain;
if (stand && !stand.stationHoldTrain && !stand.centerHoldTrain) {
cmdCommand = menuOperate.StationStand.setDetainTrain;
}
commitOperate(cmdCommand, {code:val.code}).then(({valid, operate})=>{
if (valid) {
this.selected = val;
}
});
},
getDetainStatus(code) {
const stand = this.$store.getters['map/getDeviceByCode'](code);

View File

@ -2,24 +2,34 @@
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="600px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<el-row>
<el-col :span="18">
<el-table :data="switchList" height="300px">
<el-table-column prop="name" label="道岔" />
<el-table-column prop="blockStatus" label="请求或允许动岔" />
<el-table-column prop="blockProcess" label="请求或允许动岔输出错" />
<el-table
ref="singleTable"
:data="switchList"
highlight-current-row
height="300px"
@current-change="handleCurrentChange"
>
<el-table-column prop="name" width="80" label="道岔" />
<el-table-column prop="blockStatus" label="请求或允许动岔">
<template slot-scope="scope">
<span>{{ getSignalLock(scope.row.code) }}</span>
</template>
</el-table-column>
<el-table-column prop="blockProcess" width="170" label="请求或允许动岔输出错">正确</el-table-column>
</el-table>
</el-col>
<el-col :span="6">
<div class="radio-box-title">设置状态</div>
<div class="radio-box">
<el-radio v-model="active" :label="true" style="display: block;margin-bottom: 10px;">(A)激活</el-radio>
<el-radio v-model="active" :label="false" style="display: block;">(I)取消激活</el-radio>
<el-radio v-model="active" :label="true" style="display: block;margin-bottom: 10px;" :disabled="!active">(A)激活</el-radio>
<el-radio v-model="active" :label="false" style="display: block;" :disabled="active">(I)取消激活</el-radio>
</div>
<el-checkbox v-model="allChecked" style="position: relative;top: 100px;left: 8px;">(A)全部</el-checkbox>
<el-checkbox v-model="allChecked" :disabled="true" style="position: relative;top: 100px;left: 8px;">(A)全部</el-checkbox>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="6" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定(O)</el-button>
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!selected" @click="commit">确定(O)</el-button>
</el-col>
<el-col :span="6" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">应用(A)</el-button>
@ -37,6 +47,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
// import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import { mapGetters } from 'vuex';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'SwitchActive',
@ -98,12 +109,50 @@ export default {
doClose() {
this.loading = false;
this.dialogShow = false;
this.$refs.singleTable.setCurrentRow();
this.$store.dispatch('training/emitTipFresh');
},
commit() {
const step = {
over: true,
cmdType: this.active ? CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK : CMD.Switch.CMD_SWITCH_SINGLE_LOCK,
operation: this.active ? OperationEvent.Switch.unlock.confirm.operation : OperationEvent.Switch.lock.confirm.operation,
param: { switchCode: this.selected.code}
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.doClose();
}
}).catch(() => {
this.$refs.noticeInfo.doShow();
});
},
handleClick() {
handleCurrentChange(val) {
if (!val) { return; }
const step = {
code: `${val.code}`,
operation: OperationEvent.Switch.lock.choose.operation,
param: {}
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.selected = val;
const signalEle = this.$store.getters['map/getDeviceByCode'](val.code);
this.active = !!signalEle.singleLock;
}
}).catch(() => {
this.$refs.noticeInfo.doShow();
});
},
getSignalLock(code) {
const signalEle = this.$store.getters['map/getDeviceByCode'](code);
if (signalEle.singleLock) {
return '未激活';
} else {
return '激活';
}
},
cancel() {
const operate = {

View File

@ -1,19 +1,37 @@
<template>
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="600px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="700px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<el-row>
<el-col :span="18">
<el-table :data="switchList" height="350px">
<el-table
ref="singleTable"
:data="switchList"
highlight-current-row
height="350px"
@current-change="handleCurrentChange"
>
<el-table-column prop="name" width="80" label="道岔" />
<el-table-column prop="blockStatus" label="道岔封锁状态" />
<el-table-column prop="blockProcess" label="设置封锁进程" />
<el-table-column prop="unblockProcess" label="解除封锁进程" />
<el-table-column prop="blockStatus" label="道岔封锁状态">
<template slot-scope="scope">
<span>{{ getSwitchStatus(scope.row.code) }}</span>
</template>
</el-table-column>
<el-table-column prop="blockProcess" label="设置封锁进程">
<template slot-scope="scope">
<span>{{ getProcess(scope.row.code, 'block') }}</span>
</template>
</el-table-column>
<el-table-column prop="unblockProcess" label="解除封锁进程">
<template slot-scope="scope">
<span>{{ getProcess(scope.row.code, 'unblock') }}</span>
</template>
</el-table-column>
</el-table>
</el-col>
<el-col :span="6">
<div class="radio-box-title">命令</div>
<div class="radio-box">
<el-radio v-model="command" label="normal" style="display: block;margin-bottom: 10px;">确认</el-radio>
<el-radio v-model="command" label="reverse" style="display: block;">取消</el-radio>
<el-radio v-model="command" :label="true" style="display: block;margin-bottom: 10px;">确认</el-radio>
<el-radio v-model="command" :label="false" style="display: block;">取消</el-radio>
</div>
</el-col>
</el-row>
@ -40,6 +58,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
// import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import { mapGetters } from 'vuex';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'StandDetain',
@ -54,7 +73,8 @@ export default {
dialogShow: false,
loading: false,
selected: null,
command: '',
command: true,
title: ''
};
},
computed: {
@ -62,7 +82,7 @@ export default {
'switchList'
]),
isBlock() {
return this.operate === OperationEvent.Switch.block.menu.operation;
return this.operate && this.operate.operation === OperationEvent.Switch.block.confirm.operation;
},
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
@ -75,9 +95,6 @@ export default {
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menu.domId : '';
},
title() {
return this.isBlock ? '确认/取消道岔封锁' : '确认/取消道岔解除封锁';
}
},
watch: {
@ -96,8 +113,11 @@ export default {
doShow(operate, selected) {
this.selected = selected;
//
this.operate = operate;
this.title = this.operate && this.operate.operation === OperationEvent.Switch.block.confirm.operation ? '确认/取消道岔封锁' : '确认/取消道岔解除封锁';
this.dialogShow = true;
this.$nextTick(function () {
this.$refs.singleTable.setCurrentRow(selected);
this.$store.dispatch('training/emitTipFresh');
});
},
@ -106,10 +126,43 @@ export default {
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
getSwitchStatus(code) {
const switchEle = this.$store.getters['map/getDeviceByCode'](code);
if (switchEle.blockade) {
return '锁闭的';
} else {
return '未锁闭的';
}
},
handleClick() {
commit() {
if (this.command) {
const operate = {
cmdType: this.isBlock ? CMD.Switch.CMD_SWITCH_BLOCK : CMD.Switch.CMD_SWITCH_UNBLOCK,
operation: this.isBlock ? OperationEvent.Switch.block.confirm1.operation : OperationEvent.Switch.unblock.confirm1.operation,
over: true,
param: {switchCode: this.selected.code}
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
this.$emit('commandSuccess', this.selected.code);
}
}).catch(() => {
this.$refs.noticeInfo.doShow();
});
} else {
this.cancel();
}
},
handleCurrentChange(val) {
this.$refs.singleTable.setCurrentRow(this.selected);
},
getProcess(code, type) {
if (this.selected.code === code && ((type === 'block' && this.isBlock) || (type === 'unblock' && !this.isBlock))) {
return '等待确认/取消';
} else {
return '';
}
},
cancel() {
const operate = {
@ -117,6 +170,7 @@ export default {
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$emit('cancelCommand');
this.doClose();
}
}).catch(() => {

View File

@ -2,36 +2,51 @@
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="650px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<el-row>
<el-col :span="18">
<el-table :data="stationStandList" height="350px">
<!--<el-table :data="switchList" height="350px">-->
<el-table
ref="singleTable"
:data="switchList"
highlight-current-row
height="350px"
@current-change="handleCurrentChange"
>
<el-table-column prop="name" label="道岔" />
<el-table-column prop="mode" label="模式" />
<el-table-column prop="position" label="位置" />
<el-table-column prop="reserved" label="预留" />
<el-table-column prop="status" label="状态" />
<el-table-column prop="position" label="位置">
<template slot-scope="scope">
<span>{{ getSwitchPosition(scope.row.code) }}</span>
</template>
</el-table-column>
<el-table-column prop="reserved" label="预留">未预留</el-table-column>
<el-table-column prop="status" label="状态">
<template slot-scope="scope">
<span>{{ getSwitchStatus(scope.row.code) }}</span>
</template>
</el-table-column>
</el-table>
</el-col>
<el-col :span="6">
<div class="radio-box-title">设置模式</div>
<div class="radio-box">
<el-radio v-model="mode" label="auto" style="display: block;margin-bottom: 10px;">自动</el-radio>
<el-radio v-model="mode" label="artificial" style="display: block;">人工</el-radio>
<el-radio v-model="mode" label="auto" :disabled="true" style="display: block;margin-bottom: 10px;">自动</el-radio>
<el-radio v-model="mode" label="artificial" :disabled="true" style="display: block;">人工</el-radio>
</div>
<div class="radio-box-title">设置位置</div>
<div class="radio-box">
<el-radio v-model="position" label="normal" style="display: block;margin-bottom: 10px;">定位</el-radio>
<el-radio v-model="position" label="reverse" style="display: block;">反位</el-radio>
<el-radio v-model="position" label="normal" :disabled="!selected" style="display: block;margin-bottom: 10px;">定位</el-radio>
<el-radio v-model="position" label="reverse" :disabled="!selected" style="display: block;">反位</el-radio>
</div>
<div class="radio-box-title">设置预留</div>
<div class="radio-box">
<el-radio v-model="position" label="normal" style="display: block;margin-bottom: 10px;">自动与预留</el-radio>
<el-radio v-model="position" label="reverse" style="display: block;margin-bottom: 10px;">预留</el-radio>
<el-radio v-model="position" label="reverse" style="display: block;">释放</el-radio>
<el-radio v-model="reserved" label="auto" :disabled="true" style="display: block;margin-bottom: 10px;">自动与预留</el-radio>
<el-radio v-model="reserved" label="reversed" :disabled="true" style="display: block;margin-bottom: 10px;">预留</el-radio>
<el-radio v-model="reserved" label="release" :disabled="true" style="display: block;">释放</el-radio>
</div>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="4" :offset="1">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定(O)</el-button>
<el-button :id="domIdConfirm" type="primary" :disabled="!selected" :loading="loading" :selected="true" @click="commit">确定(O)</el-button>
</el-col>
<el-col :span="4" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">应用(A)</el-button>
@ -50,7 +65,7 @@
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
// import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import { mapGetters } from 'vuex';
export default {
@ -68,12 +83,13 @@ export default {
selected: null,
mode: '',
position: '',
reserved: ''
reserved: 'reversed'
};
},
computed: {
...mapGetters('map', [
'stationStandList'
'switchList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
@ -115,12 +131,48 @@ export default {
doClose() {
this.loading = false;
this.dialogShow = false;
this.$refs.singleTable.setCurrentRow();
this.$store.dispatch('training/emitTipFresh');
},
commit() {
commitOperate(menuOperate.Switch.turnout, {switchCode: this.selected.code}, 3).then(({valid})=>{
if (valid) {
this.doClose();
}
});
},
handleClick() {
handleCurrentChange(val) {
if (!val) { return; }
commitOperate(menuOperate.Switch.turnout, {code:val.code}).then(({valid, operate})=>{
if (valid) {
const switchEle = this.$store.getters['map/getDeviceByCode'](val.code);
this.position = '';
if (switchEle.normalPosition) {
this.position = 'reverse';
} else if (switchEle.reversePosition) {
this.position = 'normal';
}
this.selected = val;
}
});
},
getSwitchPosition(code) {
const switchEle = this.$store.getters['map/getDeviceByCode'](code);
if (switchEle.normalPosition) {
return '定位';
} else if (switchEle.reversePosition) {
return '反位';
} else {
return '';
}
},
getSwitchStatus(code) {
const switchEle = this.$store.getters['map/getDeviceByCode'](code);
if (switchEle.blockade) {
return '锁闭的';
} else {
return '未锁闭的';
}
},
cancel() {
const operate = {

View File

@ -1,11 +1,19 @@
<template>
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="600px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="700px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<el-row>
<el-table :data="switchList" height="350px">
<el-table-column prop="name" width="80" label="道岔" />
<el-table-column prop="position" width="80" label="位置" />
<el-table-column prop="position" width="80" label="位置">
<template slot-scope="scope">
<span>{{ getSwitchPosition(scope.row.code) }}</span>
</template>
</el-table-column>
<el-table-column prop="blockStatus" width="80" label="预留" />
<el-table-column prop="blockStatus" width="80" label="状态" />
<el-table-column prop="blockStatus" width="80" label="状态">
<template slot-scope="scope">
<span>{{ getSwitchStatus(scope.row.code) }}</span>
</template>
</el-table-column>
<el-table-column prop="blockStatus" width="120" label="道岔封锁状态" />
<el-table-column prop="blockProcess" width="120" label="设置封锁进程" />
<el-table-column prop="unblockProcess" width="120" label="解除封锁进程" />
@ -55,9 +63,6 @@ export default {
...mapGetters('map', [
'switchList'
]),
isBlock() {
return this.operate === OperationEvent.Switch.block.init.operation;
},
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
@ -71,7 +76,7 @@ export default {
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menu.domId : '';
},
title() {
return this.isBlock ? '初始化道岔封锁' : '初始化道岔解除封锁';
return '道岔信息显示';
}
},
watch: {
@ -105,6 +110,24 @@ export default {
},
handleClick() {
},
getSwitchPosition(code) {
const switchEle = this.$store.getters['map/getDeviceByCode'](code);
if (switchEle.normalPosition) {
return '定位';
} else if (switchEle.reversePosition) {
return '反位';
} else {
return '';
}
},
getSwitchStatus(code) {
const switchEle = this.$store.getters['map/getDeviceByCode'](code);
if (switchEle.blockade) {
return '锁闭的';
} else {
return '未锁闭的';
}
},
cancel() {
const operate = {

View File

@ -51,53 +51,53 @@ export default {
menu: [],
menuNormal: {
Local: [
{
label: '区段故障解锁',
handler: this.fault,
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK
},
{
label: '区段跟踪激活',
handler: this.active,
cmdType: CMD.Section.CMD_SECTION_ACTIVE
},
{
label: '区段跟踪切除',
handler: this.split,
cmdType: CMD.Section.CMD_SECTION_CUT_OFF
},
{
label: '区段封锁',
handler: this.lock,
cmdType: CMD.Section.CMD_SECTION_BLOCK
},
{
label: '区段解封',
handler: this.unlock,
cmdType: CMD.Section.CMD_SECTION_UNBLOCK
}
// {
// label: '',
// handler: this.fault,
// cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK
// },
// {
// label: '',
// handler: this.active,
// cmdType: CMD.Section.CMD_SECTION_ACTIVE
// },
// {
// label: '',
// handler: this.split,
// cmdType: CMD.Section.CMD_SECTION_CUT_OFF
// },
// {
// label: '',
// handler: this.lock,
// cmdType: CMD.Section.CMD_SECTION_BLOCK
// },
// {
// label: '',
// handler: this.unlock,
// cmdType: CMD.Section.CMD_SECTION_UNBLOCK
// }
],
Center: [
{
label: '区段跟踪激活',
handler: this.active,
cmdType: CMD.Section.CMD_SECTION_ACTIVE
},
{
label: '区段跟踪切除',
handler: this.split,
cmdType: CMD.Section.CMD_SECTION_CUT_OFF
},
{
label: '确认计轴有效',
handler: this.alxeEffective,
cmdType: CMD.Section.CMD_SECTION_COMFIRMATION_AXLE
},
{
label: '设置临时限速',
handler: this.setSpeed,
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
}
// {
// label: '',
// handler: this.active,
// cmdType: CMD.Section.CMD_SECTION_ACTIVE
// },
// {
// label: '',
// handler: this.split,
// cmdType: CMD.Section.CMD_SECTION_CUT_OFF
// },
// {
// label: '',
// handler: this.alxeEffective,
// cmdType: CMD.Section.CMD_SECTION_COMFIRMATION_AXLE
// },
// {
// label: '',
// handler: this.setSpeed,
// cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
// }
]
},
menuForce: [

View File

@ -54,113 +54,113 @@ export default {
menu: [],
menuNormal: {
Local: [
{
label: '排列进路',
handler: this.arrangementRoute,
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
},
{
label: '取消进路',
handler: this.cancelTrainRoute,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
},
{
label: '信号重开',
handler: this.reopenSignal,
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
},
{
label: '信号机引导办理',
handler: this.guide,
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
},
{
label: '人工解锁进路', //
handler: this.humanTrainRoute,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_GUIDE
},
{
label: '信号封锁',
handler: this.lock,
cmdType: CMD.Signal.CMD_SIGNAL_BLOCK
},
{
label: '信号解封',
handler: this.unlock,
cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK
},
{
label: 'Fleet进路办理',
handler: this.singalPassModel,
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
},
{
label: 'Fleet进路取消',
handler: this.singalCancelPassModel,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
},
{
label: '进路交人工控',
handler: this.humanControl,
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING
},
{
label: '进路交自动控',
handler: this.atsAutoControl,
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
},
{
label: '查询进路控制状态',
handler: this.detail,
cmdType: CMD.Signal.CMD_SIGNAL_DETAIL
}
// {
// label: '',
// handler: this.arrangementRoute,
// cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
// },
// {
// label: '',
// handler: this.cancelTrainRoute,
// cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
// },
// {
// label: '',
// handler: this.reopenSignal,
// cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
// },
// {
// label: '',
// handler: this.guide,
// cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
// },
// {
// label: '', //
// handler: this.humanTrainRoute,
// cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_GUIDE
// },
// {
// label: '',
// handler: this.lock,
// cmdType: CMD.Signal.CMD_SIGNAL_BLOCK
// },
// {
// label: '',
// handler: this.unlock,
// cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK
// },
// {
// label: 'Fleet',
// handler: this.singalPassModel,
// cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
// },
// {
// label: 'Fleet',
// handler: this.singalCancelPassModel,
// cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
// },
// {
// label: '',
// handler: this.humanControl,
// cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING
// },
// {
// label: '',
// handler: this.atsAutoControl,
// cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
// },
// {
// label: '',
// handler: this.detail,
// cmdType: CMD.Signal.CMD_SIGNAL_DETAIL
// }
],
Center: [
{
label: '排列进路',
handler: this.arrangementRoute,
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
},
{
label: '取消进路',
handler: this.cancelTrainRoute,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
},
{
label: '人工解锁进路', //
handler: this.humanTrainRoute,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_GUIDE
},
{
label: '信号重开',
handler: this.reopenSignal,
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
},
{
label: '进路交人工控',
handler: this.humanControl,
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING
},
{
label: '进路交自动控',
handler: this.atsAutoControl,
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
},
{
label: '设置通过模式',
handler: this.singalPassModel,
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
},
{
label: '取消通过模式',
handler: this.singalCancelPassModel,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
},
{
label: '查询进路控制状态',
handler: this.detail,
cmdType: CMD.Signal.CMD_SIGNAL_DETAIL
}
// {
// label: '',
// handler: this.arrangementRoute,
// cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
// },
// {
// label: '',
// handler: this.cancelTrainRoute,
// cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
// },
// {
// label: '', //
// handler: this.humanTrainRoute,
// cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_GUIDE
// },
// {
// label: '',
// handler: this.reopenSignal,
// cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
// },
// {
// label: '',
// handler: this.humanControl,
// cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING
// },
// {
// label: '',
// handler: this.atsAutoControl,
// cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
// },
// {
// label: '',
// handler: this.singalPassModel,
// cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
// },
// {
// label: '',
// handler: this.singalCancelPassModel,
// cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
// },
// {
// label: '',
// handler: this.detail,
// cmdType: CMD.Signal.CMD_SIGNAL_DETAIL
// }
]
},
menuForce: [

View File

@ -46,43 +46,43 @@ export default {
menu: [],
menuNormal: {
Local: [
{
label: '全站设置联锁自动触发',
handler: this.setAutoTrigger,
cmdType: CMD.Station.CMD_STATION_SET_CI_AUTO_TRIGGER
},
{
label: '全站取消联锁自动触发',
handler: this.cancelAutoTrigger,
cmdType: CMD.Station.CMD_STATION_CANCEL_CI_AUTO_TRIGGER
},
{
label: '上电解锁',
handler: this.powerUnLock,
cmdType: CMD.Station.CMD_STATION_POWER_ON_UNLOCK
},
{
label: '执行关键操作测试',
handler: this.execKeyOperationTest,
cmdType: CMD.Station.CMD_STATION_KEY_OPERATION_TEST
}
// {
// label: '',
// handler: this.setAutoTrigger,
// cmdType: CMD.Station.CMD_STATION_SET_CI_AUTO_TRIGGER
// },
// {
// label: '',
// handler: this.cancelAutoTrigger,
// cmdType: CMD.Station.CMD_STATION_CANCEL_CI_AUTO_TRIGGER
// },
// {
// label: '',
// handler: this.powerUnLock,
// cmdType: CMD.Station.CMD_STATION_POWER_ON_UNLOCK
// },
// {
// label: '',
// handler: this.execKeyOperationTest,
// cmdType: CMD.Station.CMD_STATION_KEY_OPERATION_TEST
// }
],
Center: [
{
label: '所有进路自排关',
handler: this.humanControlALL,
cmdType: CMD.Station.CMD_STATION_CLOSE_AUTO_SETTING
},
{
label: '所有进路自排开',
handler: this.atsAutoControlALL,
cmdType: CMD.Station.CMD_STATION_OPEN_AUTO_SETTING
},
{
label: '执行关键操作测试',
handler: this.execKeyOperationTest,
cmdType: CMD.Station.CMD_STATION_KEY_OPERATION_TEST
}
// {
// label: '',
// handler: this.humanControlALL,
// cmdType: CMD.Station.CMD_STATION_CLOSE_AUTO_SETTING
// },
// {
// label: '',
// handler: this.atsAutoControlALL,
// cmdType: CMD.Station.CMD_STATION_OPEN_AUTO_SETTING
// },
// {
// label: '',
// handler: this.execKeyOperationTest,
// cmdType: CMD.Station.CMD_STATION_KEY_OPERATION_TEST
// }
]
},
menuForce: [

View File

@ -33,28 +33,28 @@ export default {
menu: [],
menuNormal: {
Local: [
{
label: '请求站控',
handler: this.setStationControl,
cmdType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL
},
{
label: '请求遥控',
handler: this.setCenterControl,
cmdType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_CENTER_CONTROL
}
// {
// label: '',
// handler: this.setStationControl,
// cmdType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL
// },
// {
// label: '',
// handler: this.setCenterControl,
// cmdType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_CENTER_CONTROL
// }
],
Center: [
{
label: '请求站控',
handler: this.setStationControl,
cmdType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL
},
{
label: '请求遥控',
handler: this.setCenterControl,
cmdType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_CENTER_CONTROL
}
// {
// label: '',
// handler: this.setStationControl,
// cmdType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL
// },
// {
// label: '',
// handler: this.setCenterControl,
// cmdType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_CENTER_CONTROL
// }
]
},
menuForce: [

View File

@ -54,88 +54,88 @@ export default {
menu: [],
menuNormal: {
Local: [
{
label: '扣车',
handler: this.setDetainTrain,
cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN
},
{
label: '取消扣车',
handler: this.cancelDetainTrain,
cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN
},
{
label: '提前发车',
handler: this.earlyDeparture,
cmdType:CMD.Stand.CMD_STAND_EARLY_DEPART
},
{
label: '站台详细信息',
handler: this.detail,
cmdType:CMD.Stand.CMD_STAND_VIEW_STATUS
}
// {
// label: '',
// handler: this.setDetainTrain,
// cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN
// },
// {
// label: '',
// handler: this.cancelDetainTrain,
// cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN
// },
// {
// label: '',
// handler: this.earlyDeparture,
// cmdType:CMD.Stand.CMD_STAND_EARLY_DEPART
// },
// {
// label: '',
// handler: this.detail,
// cmdType:CMD.Stand.CMD_STAND_VIEW_STATUS
// }
],
Center: [
{
label: '扣车',
handler: this.setDetainTrain,
cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN
},
{
label: '取消扣车',
handler: this.cancelDetainTrain,
cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN
},
{
label: '批量扣车',
handler: this.setBulkBuckleTrain,
cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN_ALL
},
{
label: '批量取消扣车',
handler: this.cancelBulkBuckleTrain,
cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN_ALL
},
{
label: '提前发车',
handler: this.earlyDeparture,
cmdType:CMD.Stand.CMD_STAND_EARLY_DEPART
},
{
label: '设置跳停',
handler: this.setJumpStop,
cmdType:CMD.Stand.CMD_STAND_SET_JUMP_STOP
},
{
label: '取消跳停',
handler: this.cancelJumpStop,
cmdType:CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP
},
{
label: '设置停站时间',
handler: this.setStopTime,
cmdType:CMD.Stand.CMD_STAND_SET_PARK_TIME
},
{
label: '设置运行等级',
handler: this.setRunLevel,
cmdType:CMD.Stand.CMD_STAND_SET_RUN_TIME
},
{
label: '区间列车数量限制',
handler: this.setDetainTrainAll,
cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN_AUTO
},
{
label: '取消区间列车数量限制',
handler: this.cancelDetainTrainAll,
cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN_AUTO
},
{
label: '查看站台信息',
handler: this.detail,
cmdType:CMD.Stand.CMD_STAND_VIEW_STATUS
}
// {
// label: '',
// handler: this.setDetainTrain,
// cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN
// },
// {
// label: '',
// handler: this.cancelDetainTrain,
// cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN
// },
// {
// label: '',
// handler: this.setBulkBuckleTrain,
// cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN_ALL
// },
// {
// label: '',
// handler: this.cancelBulkBuckleTrain,
// cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN_ALL
// },
// {
// label: '',
// handler: this.earlyDeparture,
// cmdType:CMD.Stand.CMD_STAND_EARLY_DEPART
// },
// {
// label: '',
// handler: this.setJumpStop,
// cmdType:CMD.Stand.CMD_STAND_SET_JUMP_STOP
// },
// {
// label: '',
// handler: this.cancelJumpStop,
// cmdType:CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP
// },
// {
// label: '',
// handler: this.setStopTime,
// cmdType:CMD.Stand.CMD_STAND_SET_PARK_TIME
// },
// {
// label: '',
// handler: this.setRunLevel,
// cmdType:CMD.Stand.CMD_STAND_SET_RUN_TIME
// },
// {
// label: '',
// handler: this.setDetainTrainAll,
// cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN_AUTO
// },
// {
// label: '',
// handler: this.cancelDetainTrainAll,
// cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN_AUTO
// },
// {
// label: '',
// handler: this.detail,
// cmdType:CMD.Stand.CMD_STAND_VIEW_STATUS
// }
]
},
menuForce: [

View File

@ -52,87 +52,87 @@ export default {
menu: [],
menuNormal: {
Local: [
{
label: '定操',
handler: this.locate,
cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION
},
{
label: '反操',
handler: this.reverse,
cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION
},
{
label: '道岔单锁',
handler: this.lock,
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK
},
{
label: '道岔单解',
handler: this.unlock,
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
},
{
label: '道岔封锁',
handler: this.block,
cmdType: CMD.Switch.CMD_SWITCH_BLOCK
},
{
label: '道岔解封',
handler: this.unblock,
cmdType: CMD.Switch.CMD_SWITCH_UNBLOCK
}
],
Center: [
{
label: '定操',
handler: this.locate,
cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION
},
{
label: '反操',
handler: this.reverse,
cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION
},
// {
// label: '',
// handler: this.locate,
// cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION
// },
// {
// label: '',
// handler: this.reverse,
// cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION
// },
// {
// label: '',
// handler: this.lock,
// cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK
// },
{
type: 'separator'
},
{
label: '区段激活',
handler: this.active,
cmdType: CMD.Switch.CMD_SWITCH_ACTIVE
},
{
label: '区段切除',
handler: this.split,
cmdType: CMD.Switch.CMD_SWITCH_CUT_OFF
},
{
type: 'separator'
},
{
label: '确认计轴有效',
handler: this.alxeEffective,
cmdType: CMD.Switch.CMD_SWITCH_COMFIRMATION_AXLE
},
{
label: '设置临时限速',
handler: this.setSpeed,
cmdType: CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED
},
{
type: 'separator'
},
{
label: '查看公里标',
handler: this.undeveloped,
cmdType: CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED
}
// {
// label: '',
// handler: this.unlock,
// cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
// },
// {
// label: '',
// handler: this.block,
// cmdType: CMD.Switch.CMD_SWITCH_BLOCK
// },
// {
// label: '',
// handler: this.unblock,
// cmdType: CMD.Switch.CMD_SWITCH_UNBLOCK
// }
],
Center: [
// {
// label: '',
// handler: this.locate,
// cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION
// },
// {
// label: '',
// handler: this.reverse,
// cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION
// },
// {
// label: '',
// handler: this.lock,
// cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK
// },
// {
// type: 'separator'
// },
// {
// label: '',
// handler: this.active,
// cmdType: CMD.Switch.CMD_SWITCH_ACTIVE
// },
// {
// label: '',
// handler: this.split,
// cmdType: CMD.Switch.CMD_SWITCH_CUT_OFF
// },
// {
// type: 'separator'
// },
// {
// label: '',
// handler: this.alxeEffective,
// cmdType: CMD.Switch.CMD_SWITCH_COMFIRMATION_AXLE
// },
// {
// label: '',
// handler: this.setSpeed,
// cmdType: CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED
// },
// {
// type: 'separator'
// },
// {
// label: '',
// handler: this.undeveloped,
// cmdType: CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED
// }
]
},
menuForce: [

View File

@ -154,7 +154,7 @@ export default {
async getParamList() {
const res = await getSimulationDestinationList(this.$route.query.group);
res.data.forEach(item => {
const lable = this.typeList.find(ele => ele.value == item.type);
const lable = this.typeList.find(ele => ele.value == item.type) || {};
item['active'] = false;
let code = `0000${item.code}`;
code = code.substring(code.length - 4);

View File

@ -216,8 +216,8 @@ export function parser(data, skinCode, showConfig) {
zrUtil.each(data.indicatorLightList || [], elem => {
mapDevice[elem.code] = createDevice(elem.type, elem, propConvert, showConfig);
if (elem.type == 'SwitchFault') {
mapDevice[elem.switchCode].switchFaultCode = elem.code; // 道岔数据上关联道岔故障表示灯需保证该数据在switchList之后处理
if (elem.type == 'SwitchFault' && mapDevice[elem.switchCode]) {
mapDevice[elem.switchCode]['switchFaultCode'] = elem.code; // 道岔数据上关联道岔故障表示灯需保证该数据在switchList之后处理
}
}, this);

View File

@ -83,6 +83,7 @@ const ExamCourseDetail = () => import('@/views/exam/detail/courseDetail');
const DemonstrationDetail = () => import('@/views/demonstration/detail/index');
const PlanMonitorEditTool = () => import('@/views/planMonitor/editTool/index');
const PlanMonitorNewEditTool = () => import('@/views/planMonitor/newEditTool/index');
const PlanMonitorEditAUSTool = () => import('@/views/planMonitor/editToolAUS/tool/index');
const PlanMonitorEditAUSLine = () => import('@/views/planMonitor/editToolAUS/line/index');
const PlanMonitorDetail = () => import('@/views/planMonitor/detail');
@ -342,6 +343,11 @@ export const publicAsyncRoute = [
component: PlanMonitorEditTool,
hidden: true
},
{ // 哈尔滨运行图编辑
path: '/plan/newTool',
component: PlanMonitorNewEditTool,
hidden: true
},
{
path: '/displayIscs/system',
component: IscsSystem,

View File

@ -65,6 +65,7 @@ const ExamCourseDetail = () => import('@/views/exam/detail/courseDetail');
const DemonstrationDetail = () => import('@/views/demonstration/detail/index');
const PlanMonitorEditTool = () => import('@/views/planMonitor/editTool/index');
const PlanMonitorNewEditTool = () => import('@/views/planMonitor/newEditTool/index');
const PlanMonitorDetail = () => import('@/views/planMonitor/detail');
const DesignPlatformHome = () => import('@/views/designPlatform/home');
@ -226,6 +227,11 @@ export const publicAsyncRoute = [
component: PlanMonitorEditTool,
hidden: true
},
{ // 哈尔滨运行图编辑
path: '/plan/newTool',
component: PlanMonitorNewEditTool,
hidden: true
},
{
path: '/displayIscs/system',
component: IscsSystem,

View File

@ -140,8 +140,8 @@ export default {
showConditionsList: [
{ enlabel:'Local&Center', label: '现地&行调', value: '01'},
{ enlabel:'Local', label: '现地', value: '02' },
{ enlabel:'Center', label: '行调', value: '03'}
{ enlabel:'Local', label: '现地', value: '03' },
{ enlabel:'Center', label: '行调', value: '02'}
],
QuestionTypeList: [

View File

@ -13,6 +13,7 @@ import FaviconBxkc from '@/assets/icon/favicon_bxkc.png';
import FaviconCrsc from '@/assets/icon/favicon_crsc.png';
import FaviconNty from '@/assets/icon/favicon_nty.png';
import FaviconBjd from '@/assets/icon/favicon_bjd.png';
import FaviconSdy from '@/assets/icon/favicon_jdy.png';
import Link_Bxkc from '@/assets/icon/link_bxkc.png';
import Link_Crsc from '@/assets/icon/link_crsc.png';
import Link_Hls from '@/assets/icon/link_hls.png';
@ -44,8 +45,35 @@ export const loginInfo = {
navigationMarginLeft: '175px',
systemType: '011'
},
nty: {
sdy: {
title: '江苏电子信息职业学院城市轨道交通实训平台',
loginPath: '/login?project=sdy',
loginParam: 'SDY',
titleDistance: '-150px',
navigationLogoWidth: '40px',
navigationMarginLeft: '60px',
systemType: '011'
},
ntyc: {
title: '南京铁道职业技术学院城市轨道交通实训平台(专用版)',
loginPath: '/login?project=ntyc',
loginParam: 'NTYC',
titleDistance: '-150px',
navigationLogoWidth: '40px',
navigationMarginLeft: '60px',
systemType: '011'
},
ntyl: {
title: '南京铁道职业技术学院城市轨道交通实训平台',
loginPath: '/login?project=ntyl',
loginParam: 'NTYL',
titleDistance: '-150px',
navigationLogoWidth: '40px',
navigationMarginLeft: '60px',
systemType: '011'
},
nty: {
title: '南京铁道职业技术学院城市轨道交通实训平台(通用版)',
loginPath:'/login?project=nty',
loginParam: 'NTY',
titleDistance: '-150px',
@ -70,7 +98,7 @@ export const loginInfo = {
systemType: '011'
},
drts: {
title: '行车调度员实训系统国赛备战版',
title: '2020年“新誉杯”全国行车调度员大赛训练系统',
loginPath: '/login?project=drts',
loginParam: 'DRTS',
loginTitle: '空串',
@ -108,8 +136,26 @@ export const loginInfo = {
navigationMarginLeft: '60px',
systemType: '013'
},
designnty: {
designntyl: {
title: '南京铁道职业技术学院城市轨道交通设计平台',
loginPath:'/design/login?project=ntyl',
loginParam: 'NTYL',
titleDistance: '-150px',
navigationLogoWidth: '40px',
navigationMarginLeft: '60px',
systemType: '011'
},
designntyc: {
title: '南京铁道职业技术学院城市轨道交通设计平台(专用版)',
loginPath:'/design/login?project=ntyc',
loginParam: 'NTYC',
titleDistance: '-150px',
navigationLogoWidth: '40px',
navigationMarginLeft: '60px',
systemType: '011'
},
designnty: {
title: '南京铁道职业技术学院城市轨道交通设计平台(通用版)',
loginPath:'/design/login?project=nty',
loginParam: 'NTY',
titleDistance: '-150px',
@ -117,6 +163,15 @@ export const loginInfo = {
navigationMarginLeft: '60px',
systemType: '011'
},
designsdy: {
title: '江苏电子信息职业学院城市轨道交通设计平台',
loginPath: '/design/login?project=sdy',
loginParam: 'JYD',
titleDistance: '-150px',
navigationLogoWidth: '40px',
navigationMarginLeft: '60px',
systemType: '011'
},
gzb: {
title: '贵州装备制造职业学院城市轨道交通实训平台',
loginPath:'/login?project=gzb',
@ -360,8 +415,14 @@ export const ProjectIcon = {
designdrts: Favicon,
nty: FaviconNty,
designnty: FaviconNty,
ntyc: FaviconNty,
designntyc: FaviconNty,
nty1: FaviconNty,
designntyl: FaviconNty,
bjd: FaviconBjd,
designbjd: FaviconBjd
designbjd: FaviconBjd,
sdy: FaviconSdy,
designsdy: FaviconSdy
};
export const ProjectCode = {
@ -377,15 +438,22 @@ export const ProjectCode = {
designdrts: 'DRTS',
nty: 'NTY',
designnty: 'NTY',
ntyl: 'NTYL',
designnty1: 'NTYL',
ntyc: 'NTYC',
designntyc: 'NTYC',
bjd: 'BJD',
designbjd: 'BJD'
designbjd: 'BJD',
sdy: 'SDY',
designsdy: 'SDY'
};
export const BottomColumnOnlyConInfo = ['heb', 'designheb', 'jyd', 'designjyd', 'tky', 'designtky', 'bxkc', 'designbxkc', 'crsc', 'designcrsc', 'hls', 'designhls', 'hyd', 'designhyd']; // 底部栏仅展示公司信息不展示备案号
export const GetMapListByProjectList = ['xty', 'designxty', 'gzb', 'designgzb', 'xadt', 'designxadt', 'heb', 'designheb', 'designdrts', 'drts', 'nty', 'designnty']; // 实训设计平台通过项目code获取地图列表的项目
export const GetMapListByProjectList = ['xty', 'designxty', 'gzb', 'designgzb', 'xadt', 'designxadt', 'heb', 'designheb', 'designdrts', 'drts', 'nty', 'designnty', 'sdy', 'designsdy', 'ntyc', 'designntyc', 'ntyl', 'designnty1']; // 实训设计平台通过项目code获取地图列表的项目
export const CaseHideProjectList = ['heb', 'designheb']; // 案例展示隐藏的项目
export const VersionBaseNoShow = ['heb', 'designheb', 'hls', 'designhls', 'drts', 'hyd', 'designhyd']; // 登录页右下角版本开发基于不展示
export const MainBodyNoShow = ['heb', 'designheb', 'jyd', 'designjyd', 'tky', 'designtky', 'bxkc', 'designbxkc', 'crsc', 'designcrsc', 'hls', 'designhls', 'hyd', 'designhyd']; // 登录页右下角主体不展示
export const ProjectLoginStyleList = ['gzb', 'designgzb', 'xty', 'designxty', 'xadt', 'designxadt', 'tky', 'designtky', 'jyd', 'designjyd', 'bxkc', 'designbxkc', 'crsc', 'designcrsc', 'hls', 'designhls', 'drts', 'hyd', 'designhyd', 'nty', 'designnty', 'bjd', 'designbjd']; // 登录页样式
export const ProjectLoginStyleList = ['gzb', 'designgzb', 'xty', 'designxty', 'xadt', 'designxadt', 'tky', 'designtky', 'jyd', 'designjyd', 'bxkc', 'designbxkc',
'crsc', 'designcrsc', 'hls', 'designhls', 'drts', 'hyd', 'designhyd', 'nty', 'designnty', 'bjd', 'designbjd', 'sdy', 'designsdy', 'ntyc', 'designntyc', 'ntyl', 'designntyl']; // 登录页样式
export const NoQrcodeList = ['heb', 'designheb'];
export const NoSimulationQrCodeList = ['heb', 'bjd'];
export const goOtherPlatformMenu = { // 导航栏快速切换平台
@ -414,7 +482,9 @@ export const goOtherPlatformMenu = { // 导航栏快速切换平台
nty: '/design/login?project=nty',
designnty: '/login?project=nty',
bjd: '/design/login?project=bjd',
designbjd: '/login?project=bjd'
designbjd: '/login?project=bjd',
sdy: '/design/login?project=sdy',
designsdy: '/login?project=sdy'
};
export const ProjectList = [
{value:'xty', label:'西铁院'},
@ -422,7 +492,10 @@ export const ProjectList = [
{value: 'xadt', label: '西安地铁'},
{value: 'heb', label: '哈尔滨'},
{value: 'drts', label: '调度大赛'},
{value: 'nty', label: '南铁院'},
{value: 'nty', label: '南铁院(通用版)'},
{value: 'ntyc', label: '南铁院(专用版)'},
{value: 'ntyl', label: '南铁院(本地版)'},
{value: 'bjd', label: '北交大'},
{value: 'urtss', label: '陪标项目'}
{value: 'urtss', label: '陪标项目'},
{value: 'sdy', label: '苏电院'}
];

View File

@ -294,6 +294,14 @@ export const OperationEvent = {
menuButton: {
operation: '1031',
domId: '_Tips-Switch-Lock-Menu{BOTTOM}'
},
choose: {
operation: '1032',
domId: '_Tips-Switch-Lock-Choose'
},
confirm: {
operation: '1033',
domId: '_Tips-Switch-Lock-confirm'
}
},
// 道岔解锁
@ -356,6 +364,14 @@ export const OperationEvent = {
init: {
operation: '1053',
domId: '_Tips-Switch-Block-Init'
},
choose: {
operation: '1054',
domId: '_Tips-Switch-Block-Choose'
},
confirm1: {
operation: '1055',
domId: '_Tips-Switch-Block-Confirm1'
}
},
// 道岔解封
@ -806,6 +822,10 @@ export const OperationEvent = {
menuButton: {
operation: '3032',
domId: '_Tips-Signal-CancelTrainRoute-Menu{BOTTOM}'
},
choose: {
operation: '3033',
domId: '_Tips-Signal-CancelTrainRoute-Choose'
}
},
// 信号重开
@ -863,6 +883,14 @@ export const OperationEvent = {
menuButton:{
operation: '3062',
domId: '_Tips-Signal-Lock-Menu{BOTTOM}'
},
choose: {
operation: '3063',
domId: '_Tips-Signal-Lock-Choose'
},
confirm1: {
operation: '3064',
domId: '_Tips-Signal-Lock-Confirm1'
}
},
// 解锁
@ -1099,6 +1127,10 @@ export const OperationEvent = {
menuButton: {
operation: '3182',
domId: '_Tips-Signal-cancelGuide-Menu{BOTTOM}'
},
confirm1: {
operation: '3183',
domId: '_Tips-Signal-cancelGuide-Confirm1'
}
},
// 联锁进路
@ -1201,6 +1233,18 @@ export const OperationEvent = {
menuButton: {
operation: '4031',
domId: '_Tips-Section-Lock-Menu{BOTTOM}'
},
choose: {
operation: '4032',
domId: '_Tips-Section-Lock-Choose'
},
confirm: {
operation: '4033',
domId: '_Tips-Section-Lock-Confirm'
},
confirm1: {
operation: '4034',
domId: '_Tips-Section-Lock-Confirm1'
}
},
// 解锁
@ -1293,6 +1337,10 @@ export const OperationEvent = {
menuButton: {
operation: '4077',
domId: '_Tips-Section-SetSpeed-Menu{BOTTOM}'
},
choose1: {
operation: '4078',
domId: '_Tips-Section-SetSpeed-Choose1'
}
},
// 取消速度
@ -1542,6 +1590,10 @@ export const OperationEvent = {
menuButton: {
operation: '5025',
domId: '_Tips-Stand-SetJumpStop-Menu{BOTTOM}'
},
confirm: {
operation: '5036',
domId: '_Tip-Stand-SetJumpStop-Confirm'
}
},
// 取消跳停
@ -1569,6 +1621,10 @@ export const OperationEvent = {
menuButton: {
operation: '5035',
domId: '_Tips-Stand-CancelJumpStop-Menu{BOTTOM}'
},
confirm: {
operation: '5036',
domId: '_Tip-Stand-CancelJumpStop-Confirm'
}
},
// 设置扣车

View File

@ -1,5 +1,6 @@
import { getSessionStorage } from '@/utils/auth';
import { listPublishMap, getMapListByProjectCode } from '@/api/jmap/map';
// listPublishMap
import { getMapListByProjectCode, getPublishMapListOnline } from '@/api/jmap/map';
import { ProjectCode } from '@/scripts/ProjectConfig';
export async function getMapListByProject() {
@ -8,7 +9,8 @@ export async function getMapListByProject() {
if (project.endsWith('xty') || project.endsWith('gzb') || project.endsWith('heb')) {
mapList = await getMapListByProjectCode(ProjectCode[project]);
} else {
mapList = await listPublishMap({ 'drawWay': true });
// mapList = await listPublishMap({ 'drawWay': true });
mapList = await getPublishMapListOnline();
}
return mapList;
}

View File

@ -57,15 +57,14 @@ service.interceptors.response.use(
// eslint-disable-next-line no-undef
EventBus.$emit('clearCheckLogin');
// 断开连接
store.dispatch('disconnect').then(()=>{
MessageBox.confirm(i18n.t('tip.logoutTips'), i18n.t('tip.hint'), {
confirmButtonText: i18n.t('tip.confirmLogin'),
showCancelButton: false,
type: 'warning'
}).then(() => {
store.dispatch('FedLogOut').then(() => {
location.reload();// 为了重新实例化vue-router对象 避免bug
});
store.dispatch('disconnect');
MessageBox.confirm(i18n.t('tip.logoutTips'), i18n.t('tip.hint'), {
confirmButtonText: i18n.t('tip.confirmLogin'),
showCancelButton: false,
type: 'warning'
}).then(() => {
store.dispatch('FedLogOut').then(() => {
location.reload();// 为了重新实例化vue-router对象 避免bug
});
});
return response.data;

View File

@ -4,7 +4,7 @@
</Jl3ddevice-Msg>
<Jl3ddevice-List v-show="isswitch" :devicelist="devicelist" @sdevice="sdevice">
</Jl3ddevice-List>
<canvas id="canvastexture" />
<canvas id="canvastexture" ></canvas>
<div class="jl3dcontrolpane" v-show="isswitch">
<el-button-group>
<el-button type="primary" @click="back">初始化</el-button>
@ -16,7 +16,7 @@
<div id="jl3dwindow" v-show="isPsd" class="windowbutton"
:style="{'background-image': 'url('+localStatic+'/texture/fk.png)'}"
@click="windowchange"></div
@click="windowchange"></div>
<div id="jl3dclose" v-show="isPsd" class="backbutton"
:style="{'background-image': 'url('+localStatic+'/texture/xx.png)'}"

View File

@ -129,6 +129,7 @@ import axios from 'axios';
}
window.updateDriverTrust = this.updateDriverTrust;
window.updateDriveValue = this.updateDriveValue;
// this.teststomp = new StompClient();
@ -274,6 +275,12 @@ import axios from 'axios';
}
}
},
updateDriveValue(newvalue){
if(newvalue != this.value){
this.value = newvalue;
}
},
updatetrainlist(){
getSimulationTrainlistNew(this.group).then(netdata => {
this.options = [];

View File

@ -1,6 +1,6 @@
<template>
<div class="jalmap3ddiv">
<div id="drivediv" class="jalmap3ddiv" >
<div class="trainstatus">
{{$t('jlmap3d.trainGroupNumber')}}{{ trainnum }}</br>
@ -71,6 +71,7 @@ export default {
},
data() {
return {
driveIndex:1500,
trainlist: null,
stationlist: null,
msgdata: null,
@ -92,6 +93,7 @@ export default {
dcontrolshow: false,
msgshow:false,
controlmsg:"不能选择其它列车",
};
},
watch: {
@ -161,10 +163,13 @@ export default {
this.jlmap3d.endsocket();
this.jlmap3d.dispose();
this.jlmap3d = null;
// window.removeEventListener('popstate', this.goBack, false);
// this.$destroy();
}
},
destroyed(){
},
computed: {
userId() {
return this.$store.state.user ? this.$store.state.user.id : '';
@ -178,14 +183,35 @@ export default {
if(this.$route.query.type == "DRIVE"){
this.backmsg = "退出";
}
// if (window.history && window.history.pushState) {
// history.pushState(null, null, document.URL);
// window.addEventListener('popstate', this.goBack, false);
// }
// this.$refs.mmiui.init();
},
methods: {
show: function (skinCode,group) {
// goBack(){
// if(this.$route.query.type == "DRIVE"){
// store.dispatch('LogOut').then(() => {
// location.reload();
// });
// }else{
// this.$emit('showdriving');
// this.jlmap3d.eventoff();
// this.jlmap3d.animateoff();
// // this.jlmap3d = null;
// }
// // this.jlmap3d = null;
// },
show: function (skinCode,group,zindex) {
// console.log("show");
// console.log(skinCode);
// console.log(this.jlmap3d);
if(zindex){
this.driveIndex = zindex;
document.getElementById("drivediv").style.zIndex = zindex;
}
if (this.jlmap3d == null) {
this.init(skinCode,group);
} else {
@ -287,9 +313,14 @@ export default {
updatestatus(newdata){
if(newdata.groupNumber){
this.trainnum = newdata.groupNumber;
updateDriveValue(this.trainnum);
}
updatedoorlight(newdata);
this.$refs.mmiui.updatetrainstatus(newdata);
if(this.$refs.mmiui){
this.$refs.mmiui.updatetrainstatus(newdata);
}
updatabuttonlight(newdata);
},
warningmsg(nowmsg){
@ -354,7 +385,7 @@ export default {
}
.trainstatus{
left:0;
left:48%;
top:0;
width:fit-content;
width:-webkit-fit-content;

View File

@ -1,6 +1,11 @@
<template>
<div class="jl3dtrafficplan">
<div id="jl3d" :class="lineCode=='07'?'jl3ddraw':'jl3ddraw1'" />
<div id="testjlmap3d" class="jlmap3ddraw">
<canvas id="canvastexture" />
</div>
<div class="station" :style="{'background-image': 'url('+localStatic+'/texture/scene.png)'}">
<div style="margin-top:5%;font-size: 30px;">当前列车:</div>
<el-select v-model="value" class="listmenu" placeholder="请选择列车" @visible-change="updateTrainList" @change="updateTrainCode">
@ -225,7 +230,6 @@ export default {
this.trainlist.push(newTrainList[newRunList[i].code]);
}
// console.log(this.trainlist);
// if(){
//
@ -373,4 +377,14 @@ export default {
width:250px;
}
.jlmap3ddraw {
float: left;
left: 0;
//left:20%;
width: 100%;
height: 100%;
position:absolute;
z-index: -1;
}
</style>

View File

@ -108,7 +108,7 @@
</el-col>
<el-col :span="18" style="text-align: left">
<div style="margin-top: 10px">服务电话13289398171</div>
<div style="margin-top: 10px">截止日期2020年12月31日</div>
<!--<div style="margin-top: 10px">截止日期2020年12月31日</div>-->
</el-col>
</el-row>
</div>
@ -741,7 +741,7 @@ export default {
font-size: 40px;
font-weight: bold;
top: 150px;
width: 1000px;
width: 1050px;
text-align: center;
position: absolute;
}

View File

@ -1071,7 +1071,7 @@ export default {
width: 503px;
transform: translateX(-503px);
transition: all 0.4s;
z-index: 9;
z-index: 35;
&.active{
transform: translateX(0px);
}

View File

@ -28,7 +28,8 @@
</el-button-group>
</div>
<Jl3d-Device
v-if="deviceShow"
v-if="deviceif"
v-show="deviceShow"
ref="Jl3dDevice"
:panel-show="deviceShow"
@closedevice3dview="jumpjlmap3dmodel"
@ -113,7 +114,8 @@ export default {
mapId:'',
lineCode:'',
practiceDisabled:false,
deviceShow: false,
deviceif:false,
deviceShow: true,
drivingShow: false,
jl3dtrafficplan:this.$t('display.demon.trafficplantext'),
jl3dtraffictrain:this.$t('display.demon.traffictraintext'),
@ -159,11 +161,16 @@ export default {
}
},
jumpjlmap3dmodel() {
if (this.deviceShow == false) {
this.deviceShow = true;
if (this.deviceif == false) {
this.deviceif = true;
} else {
this.deviceShow = false;
if (this.deviceShow == false) {
this.deviceShow = true;
} else {
this.deviceShow = false;
}
}
},
showdriving() {
this.drivingShow = false;

View File

@ -22,7 +22,7 @@
<run-plan-view v-if="project!== 'bjd'" ref="runPlanView" :group="group" />
<!-- 加载剧本列表弹窗 -->
<add-quest ref="addQuest" @selectQuest="selectQuest" />
<run-plan-edit v-if="isScheduling && isDepot" ref="runPlanEdit" />
<!-- <run-plan-edit v-if="isScheduling && isDepot" ref="runPlanEdit" /> -->
</div>
</template>
<script>
@ -33,9 +33,10 @@ import FaultChoose from './demon/faultChoose';
import AddQuest from './demon/addQuest';
import { OperateMode } from '@/scripts/ConstDic';
import { getByGroupStationList } from '@/api/jmap/map';
import RunPlanEdit from './demon/runPlanEdit';
// import RunPlanEdit from './demon/runPlanEdit';
import { getEveryDayRunPlanNew } from '@/api/simulation';
import { getSessionStorage } from '@/utils/auth';
import { getToken } from '@/utils/auth';
//
export default {
@ -45,7 +46,7 @@ export default {
RunPlanView,
FaultChoose,
AddQuest,
RunPlanEdit,
// RunPlanEdit,
SelectStation
},
props: {
@ -216,7 +217,20 @@ export default {
this.$jlmap.updateShowMode(list, showMode); //
},
runPlanEditShow() {
this.$refs.runPlanEdit.doShow();
// this.$refs.runPlanEdit.doShow();
// const query = { lineCode: lineCode, mapId: this.$route.params.mapId, planId: planId, planName: planName };
// this.$router.push({ path: `/plan/tool`, query: query });
const routeData = this.$router.resolve({
path:'/plan/newTool',
query:{
mapId:this.$route.query.mapId,
lineCode:this.$route.query.lineCode,
token:getToken(),
project: this.project,
noPreLogout: true
}
});
window.open(routeData.href, '_blank', 'noopener noreferrer');
}
}
};

View File

@ -26,11 +26,11 @@ export default {
return {
offsetY: 15,
offsetX: 150,
swch: '03',
swch: '02',
rightWidth: 0,
swchList: [
{ value: '03', name: '现地' },
{ value: '02', name: '行调' },
{ value: '03', name: '现地' },
{ value: '04', name: '大屏' }
]
};
@ -85,6 +85,7 @@ export default {
}
},
switchMode(val) {
// 03 02
if (val === '03' && this.localStationShow) {
if (this.$route.path.indexOf('mapPreviewNew') !== -1) {
this.offsetX = 150 + this.rightWidth;

View File

@ -50,7 +50,8 @@
<members-manage ref="membersManage" :is-admin="isAdmin" @addSimulationMember="addSimulationMember" /> <!-- 成员管理 -->
<add-member ref="addMember" />
<Jl3d-Device
v-if="deviceShow"
v-if="deviceif"
v-show="deviceShow"
ref="Jl3dDevice"
:panel-show="deviceShow"
@closedevice3dview="devicemodel"
@ -124,7 +125,8 @@ export default {
mapViewLoadedOver: false,
dataError: false,
isAdmin: false,
deviceShow: false,
deviceif:false,
deviceShow: true,
centralizedStationMap: {}
};
},
@ -175,6 +177,7 @@ export default {
this.showSelectStation && this.setShowStation(this.showStation);
// this.initMemberUserInfo();
if (this.$route.query.type === 'VR_PSD') {
this.deviceif = true;
this.deviceShow = true;
}
if (this.$route.query.type === 'DRIVE') {
@ -292,11 +295,16 @@ export default {
// });
// },
devicemodel() {
if (this.deviceShow == false) {
this.deviceShow = true;
if (this.deviceif == false) {
this.deviceif = true;
} else {
this.deviceShow = false;
if (this.deviceShow == false) {
this.deviceShow = true;
} else {
this.deviceShow = false;
}
}
},
/* 地图根据仿真group获取仿真基础信息 */
async loadSimulationInfo() {
@ -385,6 +393,7 @@ export default {
this.$store.dispatch('training/setPrdType', '04');
this.$store.dispatch('training/setRoles', 'DRIVER');
this.jl3dmaintainershow = false;
this.hidepanel();
break;
case 'MAINTAINER':
this.$store.dispatch('training/setPrdType', '');
@ -476,7 +485,7 @@ export default {
if (this.$store.state.training.prdType == '04') {
this.panelShow = false;
this.drivingShow = true;
this.$refs.Jl3dDrive.show(this.mapId, this.group);
this.$refs.Jl3dDrive.show(this.mapId, this.group, 34);
} else {
const routeData = this.$router.resolve({
path:'/jlmap3d/sandbox',

View File

@ -244,7 +244,7 @@ export default {
</script>
<style>
.schema {
z-index: 34;
z-index: 8;
display: inline;
position: absolute;
right: 5px;

View File

@ -7,7 +7,7 @@
<script>
import MapCommon from './common/index';
import { getToken } from '@/utils/auth';
import { creatSubscribe, clearSubscribe, displayTopic} from '@/utils/stomp';
import { creatSubscribe, clearSubscribe, displayTopic } from '@/utils/stomp';
import { checkLoginLine } from '@/api/login';
import { getSimulationMemberList, getAllSimulationUser } from '@/api/simulation';
import { mapGetters } from 'vuex';
@ -27,7 +27,8 @@ export default {
mouseNum: 1,
mouseNumTime: 0,
mapBoxP: null,
mode: ''
mode: '',
groupModel: ''
};
},
computed: {
@ -71,6 +72,7 @@ export default {
window.onbeforeunload = this.clearSubscribe;
this.mode = this.$route.params.mode || '';
this.currentMap = this.$refs.mapCommon;
this.groupModel = this.$route.query.group;
this.checkLoginLineTimer(); //
this.checkMouseStatusTimer(); //
this.$nextTick(() => {
@ -112,7 +114,7 @@ export default {
await this.$store.dispatch('training/setHasSubscribed');
},
clearSubscribe() {
clearSubscribe(`${displayTopic}\/${this.$route.query.group}`);
clearSubscribe(`${displayTopic}\/${this.groupModel}`);
},
setCenter(code) {
this.$refs.mapCommon && this.$refs.mapCommon.setCenter(code);

View File

@ -458,8 +458,8 @@ export default {
if (valid) {
const data = Object.assign({_type: this.editModel.type}, this.editModel);
console.log(data, '=====');
this.$emit('updateMapModel', data);
this.field = '';
this.$emit('updateMapModel', data);
this.field = '';
}
});
},

View File

@ -8,6 +8,7 @@
:rules="rules"
type="Resource"
@updateMapModel="updateMapModel"
@clearDeviceSelect="clearDeviceSelect"
/>
</el-tab-pane>
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second" :lazy="lazy">
@ -162,6 +163,9 @@ export default {
this.$emit('setCenter', code);
this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code));
},
clearDeviceSelect() {
this.$emit('deviceSelect', '');
},
deviceSelect(selected) {
this.$refs.form && this.$refs.form.resetFields();
this.$refs.make && this.$refs.make.resetFields();

View File

@ -8,6 +8,7 @@
:rules="rules"
type="Arrow"
@updateMapModel="updateMapModel"
@clearDeviceSelect="clearDeviceSelect"
/>
</el-tab-pane>
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second" :lazy="lazy">
@ -139,6 +140,9 @@ export default {
clear() {
this.addModel = getModel('Arrow');
},
clearDeviceSelect() {
this.$emit('deviceSelect', '');
},
create() {
const model = deepAssign(this.addModel, {code:getUID('Arrow', this.arrowList)});
this.$emit('updateMapModel', model);

View File

@ -51,6 +51,7 @@ export default {
data.content = `${this.editModel.prepend}::${this.editModel.content}`;
}
this.$emit('updateMapModel', data);
this.$emit('clearDeviceSelect');
} else {
this.$message('还有属性未填写,修改未生效!');
}

View File

@ -8,6 +8,7 @@
:rules="rules"
:type="editModel.type"
@updateMapModel="updateMapModel"
@clearDeviceSelect="clearDeviceSelect"
/>
</el-tab-pane>
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second" :lazy="lazy">
@ -23,6 +24,11 @@
</el-button-group>
</div>
</el-tab-pane>
<el-tab-pane class="view-control" label="批量操作" name="three" :lazy="lazy">
<div class="view-control-content">
<el-button type="primary" style="margin: 0 auto;display: block;" @click="handleDelete">一键删除无效数据</el-button>
</div>
</el-tab-pane>
</el-tabs>
</template>
@ -128,7 +134,7 @@ export default {
name: this.$t('map.drawData'),
item: [
{ prop:'type', label: this.$t('map.saidLampType'), type: 'select', optionLabel: 'name', optionValue: 'value', options: this.typeList, deviceChange: this.typeChange },
{ prop: 'code', label: `${this.$t('map.code')}`, type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.selectLists, deviceChange: this.deviceChange },
{ prop: 'code', label: `${this.$t('map.code')}`, type: 'select', optionLabel: 'code', optionValue: 'code', options: this.selectLists, deviceChange: this.deviceChange },
{ prop: 'name', label: this.$t('map.saidLampName'), type: 'input', isHidden: this.noNameTypeList.includes(this.editModel.type) },
{ prop: 'position', label: this.$t('map.textPoints'), type: 'coordinate', width: '140px', children: [
{ prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px' },
@ -228,6 +234,9 @@ export default {
this.$emit('deviceSelect', '');
}
},
clearDeviceSelect() {
this.$emit('deviceSelect', '');
},
handleIndicatorLightList(indicatorLightList) {
this.atsControlList = [];
this.centerCommunicationList = [];
@ -444,6 +453,25 @@ export default {
}
return idPrefix;
},
handleDelete() {
this.$confirm('您是否确定一键删除无用数据?', this.$t('tip.hint'), {
confirmButtonText: this.$t('tip.confirm'),
cancelButtonText: this.$t('tip.cancel'),
type: 'warning'
}).then(() => {
const models = [];
this.indicatorLightList.forEach(item => {
const model = this.$store.getters['map/getDeviceByCode'](item.stationCode);
if (!model) {
models.push(deepAssign(item, { _dispose: true }));
}
});
models.length && this.$emit('updateMapModel', models);
this.$message.success('删除成功!');
}).catch(() => {
this.$message.info('删除失败');
});
},
changeBelongStation(code) {
if (code) {
this.stationList.forEach(item => {

View File

@ -8,6 +8,7 @@
:rules="rules"
type="Counter"
@updateMapModel="updateMapModel"
@clearDeviceSelect="clearDeviceSelect"
/>
</el-tab-pane>
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second" :lazy="lazy">
@ -136,7 +137,7 @@ export default {
all:{
name:'',
item: [
{ prop: 'stationCode', label: this.$t('map.stationName'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList },
{ prop: 'stationCode', label: this.$t('map.stationNameColon'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList },
{ prop: 'type', label: this.$t('map.counterType'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.typeList }
]
}
@ -162,6 +163,9 @@ export default {
this.addModel.stationCode = selected.code;
}
},
clearDeviceSelect() {
this.$emit('deviceSelect', '');
},
create() {
const uid = getUID('Counter', this.counterList);
const model = {

View File

@ -8,6 +8,7 @@
:rules="rules"
type="DelayUnlock"
@updateMapModel="updateMapModel"
@clearDeviceSelect="clearDeviceSelect"
/>
</el-tab-pane>
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second" :lazy="lazy">
@ -134,7 +135,7 @@ export default {
all:{
name:'',
item: [
{ prop: 'stationCode', label: this.$t('map.stationName'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList }
{ prop: 'stationCode', label: this.$t('map.stationNameColon'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList }
]
}
}
@ -148,6 +149,9 @@ export default {
deviceChange(code) {
this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code));
},
clearDeviceSelect() {
this.$emit('deviceSelect', '');
},
deviceSelect(selected) {
this.$nextTick(() => {
this.$refs.form && this.$refs.form.resetFields();

View File

@ -8,6 +8,7 @@
:rules="rules"
type="Resource"
@updateMapModel="updateMapModel"
@clearDeviceSelect="clearDeviceSelect"
/>
</el-tab-pane>
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second" :lazy="lazy">
@ -200,6 +201,9 @@ export default {
this.$emit('deviceSelect', '');
}
},
clearDeviceSelect() {
this.$emit('deviceSelect', '');
},
hover(field) {
this.field = field === this.field ? '' : field;
if (this.field) {
@ -229,8 +233,8 @@ export default {
},
updateMapModel(data) {
data.uniqueCode = `${data.startStationCode}-${data.endStationCode}-${data.right}`;
this.$emit('updateMapModel', data);
this.field = '';
this.$emit('updateMapModel', data);
this.field = '';
},
deleteObj() {
this.$refs.dataform.deleteObj();

View File

@ -8,6 +8,7 @@
:rules="rules"
type="Esp"
@updateMapModel="updateMapModel"
@clearDeviceSelect="clearDeviceSelect"
/>
</el-tab-pane>
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second" :lazy="lazy">
@ -15,6 +16,11 @@
<el-button type="primary" style="margin: 0 auto;display: block;" @click="create">批量创建</el-button>
</div>
</el-tab-pane>
<el-tab-pane class="view-control" label="批量操作" name="three" :lazy="lazy">
<div class="view-control-content">
<el-button type="primary" style="margin: 0 auto;display: block;" @click="handleDelete">一键删除无效数据</el-button>
</div>
</el-tab-pane>
</el-tabs>
</template>
@ -109,6 +115,9 @@ export default {
this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code));
// this.edit();
},
clearDeviceSelect() {
this.$emit('deviceSelect', '');
},
hover(field) {
this.field = field === this.field ? '' : field;
if (this.field) {
@ -162,9 +171,29 @@ export default {
this.$message('暂无新车站或车站已有对应紧急停车按钮!');
}
},
//
handleDelete() {
this.$confirm('您是否确定一键删除无用数据?', this.$t('tip.hint'), {
confirmButtonText: this.$t('tip.confirm'),
cancelButtonText: this.$t('tip.cancel'),
type: 'warning'
}).then(() => {
const models = [];
this.espList.forEach(item => {
const model = this.$store.getters['map/getDeviceByCode'](item.standCode);
if (!model) {
models.push(deepAssign(item, { _dispose: true }));
}
});
models.length && this.$emit('updateMapModel', models);
this.$message.success('删除成功!');
}).catch(() => {
this.$message.info('删除失败');
});
},
updateMapModel(data) {
this.$emit('updateMapModel', data);
this.field = '';
this.$emit('updateMapModel', data);
this.field = '';
},
deleteObj() {
this.$refs.dataform.deleteObj();

View File

@ -8,6 +8,7 @@
:rules="rules"
type="Resource"
@updateMapModel="updateMapModel"
@clearDeviceSelect="clearDeviceSelect"
/>
</el-tab-pane>
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second" :lazy="lazy">
@ -143,6 +144,9 @@ export default {
this.$emit('setCenter', code);
this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code));
},
clearDeviceSelect() {
this.$emit('deviceSelect', '');
},
deviceSelect(selected) {
this.$refs.form && this.$refs.form.resetFields();
this.$refs.make && this.$refs.make.resetFields();

View File

@ -3,10 +3,12 @@
<div class="map-control">
<div class="border-card">
<div class="map-operate">
<span>
{{ $t('map.mapName') }}
<b>{{ mapInfo.name }}</b>
</span>
<div style="float: left;width: 280px;overflow: hidden;height: 17px;text-overflow: ellipsis;white-space: nowrap;">
<span>{{ $t('map.mapName') }}</span>
<el-tooltip class="item" effect="dark" :content="mapInfo.name" placement="top">
<b>{{ mapInfo.name }}</b>
</el-tooltip>
</div>
<el-button v-if="isSave" type="text" style="float: right; padding: 3px 0" :disabled="$attrs.mapSaveing" @click="saveMapEvent">{{ $t('map.save') }}</el-button>
<el-dropdown class="operate-button" trigger="click">
<span class="el-dropdown-link">数据操作</span>
@ -123,7 +125,7 @@ export default {
{label: this.$t('map.trainWindow'), name:'TrainWindow', menus:TrainWindowDraft},
{label: this.$t('map.zcZoneControl'), name:'ZcControl', menus:ZcControlDraft},
{label: this.$t('map.functionButton'), name:'ControlDraft', menus:ControlDraft},
{label: this.$t('map.saidLamp'), name:'ControlLamp', menus:ControlLamp},
{label: this.$t('map.saidLamp'), name:'ControlLamp', menus:ControlLamp}, //
{label: this.$t('map.train'), name:'Train', menus:TrainDraft},
{label: this.$t('map.line'), name:'Line', menus:LineDraft},
{label: '供电线', name:'Power', menus:PowerDraft},

View File

@ -8,6 +8,7 @@
:rules="rules"
type="LcControl"
@updateMapModel="updateMapModel"
@clearDeviceSelect="clearDeviceSelect"
/>
</el-tab-pane>
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second" :lazy="lazy">
@ -142,6 +143,9 @@ export default {
this.$emit('setCenter', code);
this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code));
},
clearDeviceSelect() {
this.$emit('deviceSelect', '');
},
deviceSelect(selected) {
this.$refs.form && this.$refs.form.resetFields();
this.$refs.make && this.$refs.make.resetFields();

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