Merge remote-tracking branch 'origin/test'
This commit is contained in:
commit
92aad88344
@ -83,7 +83,8 @@ export function getLessonByClassId(classId) {
|
||||
/** 强制删除课程(即删除课程和课程关联的试卷) */
|
||||
export function forceDeleteLesson(lessonId) {
|
||||
return request({
|
||||
url: `/api/lesson/usedLesson/${lessonId}`
|
||||
url: `/api/lesson/usedLesson/${lessonId}`,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -69,6 +69,14 @@ export function updateLessonChapter(data) {
|
||||
});
|
||||
}
|
||||
|
||||
/** 删除课程章节*/
|
||||
export function deleteLessonChapter(id) {
|
||||
return request({
|
||||
url: `/api/lessonDraft/chapter/${id}`,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
|
||||
/** 创建课程章节详细内容*/
|
||||
export function getLessonChapterDetail(data) {
|
||||
return request({
|
||||
|
@ -238,3 +238,12 @@ export function realDeviceIsUsedNew(group, projectCode) {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 获取所有需要值班员的车站(新版)
|
||||
export function getAvailableStaionList(mapId) {
|
||||
return request({
|
||||
url: `/api/map/${mapId}/station/needSupervisor`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -75,5 +75,6 @@ export default {
|
||||
deviceManage: 'Device management',
|
||||
iscsDraw: 'Iscs Draw',
|
||||
iscsSystem: 'Iscs System',
|
||||
studentManage: 'Student manage'
|
||||
studentManage: 'Student manage',
|
||||
examDetail: 'Exam detail'
|
||||
};
|
||||
|
@ -78,5 +78,7 @@ export default {
|
||||
iscsSystem: 'Iscs系统',
|
||||
studentManage: '学生管理',
|
||||
competitionManage: '竞赛管理',
|
||||
refereeJManage: '仿真管理'
|
||||
refereeJManage: '仿真管理',
|
||||
homeJsxt: '首页',
|
||||
examDetail: '考试详情'
|
||||
};
|
||||
|
File diff suppressed because one or more lines are too long
@ -53,6 +53,7 @@ export function Jlmap3ddata(mapid,scope){
|
||||
// console.log(mapid);
|
||||
// console.log(data3did);
|
||||
getMapDetail(mapid).then(data => {
|
||||
console.log(data);
|
||||
let mapdata = data.data;
|
||||
//console.log(data3did);
|
||||
jlmap3ddata.id = data3did;
|
||||
|
@ -33,7 +33,9 @@ export function getmodels(data) {
|
||||
}
|
||||
assets.push(asset);
|
||||
}
|
||||
|
||||
postmap.assets = JSON.stringify(assets);
|
||||
|
||||
//link轨道
|
||||
let links = [];
|
||||
for(let i=0;i<data.mapdata.linklist.linksgroup.children.length;i++){
|
||||
|
@ -21,19 +21,96 @@ export function getmodels(data) {
|
||||
|
||||
return postmap;
|
||||
}else{
|
||||
|
||||
let models = {
|
||||
stationtexture:"0",
|
||||
istexture:false,
|
||||
assets:[],
|
||||
};
|
||||
//资源
|
||||
let assets = [];
|
||||
for(let i=0;i<data.assetloader.modellist.length;i++){
|
||||
let asset = {
|
||||
id:data.assetloader.modellist[i].id,
|
||||
name:data.assetloader.modellist[i].name,
|
||||
deviceType:data.assetloader.modellist[i].deviceType,
|
||||
type:data.assetloader.modellist[i].type,
|
||||
assetUrl:data.assetloader.modellist[i].assetUrl
|
||||
}
|
||||
assets.push(asset);
|
||||
// for(let i=0;i<data.assetloader.modellist.length;i++){
|
||||
// let asset = {
|
||||
// id:data.assetloader.modellist[i].id,
|
||||
// name:data.assetloader.modellist[i].name,
|
||||
// deviceType:data.assetloader.modellist[i].deviceType,
|
||||
// type:data.assetloader.modellist[i].type,
|
||||
// assetUrl:data.assetloader.modellist[i].assetUrl
|
||||
// }
|
||||
// assets.push(asset);
|
||||
// }
|
||||
|
||||
//信号机资源
|
||||
let assetsignal = {
|
||||
id:"3",
|
||||
name:"低位三灯",
|
||||
deviceType:"signal",
|
||||
type:"low",
|
||||
assetUrl:"../../static/model/signal/d3d.FBX"
|
||||
}
|
||||
postmap.assets = JSON.stringify(assets);
|
||||
assets.push(assetsignal);
|
||||
|
||||
//列车资源
|
||||
let assettrain = {
|
||||
id:"9",
|
||||
name:"6节列车",
|
||||
deviceType:"train",
|
||||
type:"num4",
|
||||
assetUrl:"../../static/model/train/train.FBX"
|
||||
}
|
||||
assets.push(assettrain);
|
||||
|
||||
let assetneicestation = {
|
||||
id:"8",
|
||||
name:"内侧车站",
|
||||
deviceType:"stand",
|
||||
type:"num4",
|
||||
assetUrl:"../../static/model/station/fuzhou.FBX"
|
||||
}//"../../static/model/station/fuzhou/fuzhou.FBX"
|
||||
assets.push(assetneicestation);
|
||||
|
||||
let assetswitch = {
|
||||
id:"104",
|
||||
name:"道岔",
|
||||
deviceType:"autoswitch",
|
||||
type:"fuzhou",
|
||||
assetUrl:"../../static/model/auto/autoswitch.FBX"
|
||||
}
|
||||
assets.push(assetswitch);
|
||||
|
||||
let assetwaicestation = {
|
||||
id:"10",
|
||||
name:"外侧车站",
|
||||
deviceType:"standwaice",
|
||||
type:"num4",
|
||||
assetUrl:"../../static/model/station/waicestation.FBX"
|
||||
}
|
||||
assets.push(assetwaicestation);
|
||||
|
||||
let assetstation3 = {
|
||||
id:"10000",
|
||||
name:"三站台",
|
||||
deviceType:"station3",
|
||||
type:"num4",
|
||||
assetUrl:"../../static/model/station/station3.FBX"
|
||||
}
|
||||
assets.push(assetstation3);
|
||||
|
||||
let backgroundmodel = {
|
||||
id:"1010",
|
||||
name:"xiansuidao",
|
||||
deviceType:"suidaobg",
|
||||
type:"xiansuidao",
|
||||
picUrl:"",
|
||||
assetUrl:"../../static/model/suidao/xiansuidao.FBX"
|
||||
}
|
||||
assets.push(backgroundmodel);
|
||||
|
||||
models.assets = assets;
|
||||
models.stationtexture = "xian3";
|
||||
models.istexture = true;
|
||||
console.log(models);
|
||||
postmap.assets = JSON.stringify(models);
|
||||
//link轨道
|
||||
// let links = [];
|
||||
// for(let i=0;i<data.mapdata.linklist.linksgroup.children.length;i++){
|
||||
|
@ -162,8 +162,8 @@ export function JLmap3dEdit(dom, data, mapid) {
|
||||
this.export = function(){
|
||||
let exporter = new THREE.OBJExporter();
|
||||
console.log(scope.mapdata);
|
||||
let exportmodels = scope.mapdata.stationstandlist.group;
|
||||
// let exportmodels = scope.mapdata.sectionlist.sectiongroup;
|
||||
// let exportmodels = scope.mapdata.stationstandlist.group;
|
||||
let exportmodels = scope.mapdata.sectionlist.sectiongroup;
|
||||
// let exportmodels = scope.mapdata.stationstandlist.group;
|
||||
let result = exporter.parse( exportmodels );
|
||||
|
||||
|
@ -166,6 +166,7 @@ export function SectionList() {
|
||||
// console.log(scope.sections.datalist);
|
||||
// console.log(scope.stopsection);
|
||||
let stationlist = jlmap3ddata.stationstandlist.list;
|
||||
console.log(jlmap3ddata.stationstandlist.list);
|
||||
let stopsections = [];
|
||||
|
||||
|
||||
@ -193,7 +194,7 @@ export function SectionList() {
|
||||
realstopsection.downcode = stationlist[i].direction1.section;
|
||||
}
|
||||
}
|
||||
|
||||
console.log(realstopsection);
|
||||
realstopsection.posx =(realstopsection.topsection.startx + realstopsection.downsection.startx)/2;
|
||||
|
||||
|
||||
|
@ -28,6 +28,7 @@ export function StationStandList() {
|
||||
|
||||
let newstationstand = new StationStandModel(stationdata[i]);
|
||||
//判断站台是否显示
|
||||
console.log(stationdata[i]);
|
||||
if(stationdata[i].visible == true){
|
||||
|
||||
//遍历车站站台数据
|
||||
@ -61,11 +62,14 @@ export function StationStandList() {
|
||||
}
|
||||
|
||||
}
|
||||
scope.list.push(newstationstand);
|
||||
if(newstationstand.code != null){
|
||||
scope.list.push(newstationstand);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
console.log(scope.list);
|
||||
//建立需要显示车的车站模型对象
|
||||
// for(let i=0;i<scope.list.length;i++){
|
||||
//
|
||||
@ -157,7 +161,7 @@ export function StationStandList() {
|
||||
}
|
||||
this.loadpromise = function(jlmap3ddata,standsdata,jlmapstanddata,scene,assetloader){
|
||||
return new Promise(function(resolve, reject){
|
||||
|
||||
|
||||
let stations = jlmap3ddata.stationstandlist.list;
|
||||
let num;
|
||||
let num2;
|
||||
|
@ -22,7 +22,7 @@ var Staticmodel = {
|
||||
deviceType: "stationstand",
|
||||
type: "low",
|
||||
picUrl: "",
|
||||
assetUrl: "../../static/model/device/stationstand/stationstand.FBX"
|
||||
assetUrl: "../../static/model/device/stationstand/stationstandhrb.FBX"
|
||||
//https://joylink.club/oss/wx/stationstand/stationstand.FBX
|
||||
//../../static/model/device/stationstand.FBX
|
||||
|
||||
|
@ -544,8 +544,8 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,sta
|
||||
signallist.list[code].mesh.getObjectByName("red").material.map = materials[0];
|
||||
signallist.list[code].mesh.getObjectByName("red").material.map.needsUpdate = true;
|
||||
}else{
|
||||
signallist.list[code].mesh.getObjectByName("green").material.map = materials[3];
|
||||
signallist.list[code].mesh.getObjectByName("green").material.map.needsUpdate = true;
|
||||
signallist.list[code].mesh.getObjectByName("red").material.map = materials[3];
|
||||
signallist.list[code].mesh.getObjectByName("red").material.map.needsUpdate = true;
|
||||
}
|
||||
|
||||
if(data.yellow == 1){
|
||||
|
479
src/jlmap3d/jl3dmaintainer/jlmap3dmaintainer.js
Normal file
479
src/jlmap3d/jl3dmaintainer/jlmap3dmaintainer.js
Normal file
@ -0,0 +1,479 @@
|
||||
import Vue from 'vue';
|
||||
//main
|
||||
// import * as THREE from 'three';
|
||||
//模型loader
|
||||
import { AssetLoader } from '@/jlmap3d/main/loaders/AssetLoader';
|
||||
import { FBXLoader } from '@/jlmap3d/main/loaders/FBXLoader';
|
||||
|
||||
//data
|
||||
import { Jl3ddata } from '@/jlmap3d/main/model/jl3ddata';
|
||||
|
||||
//setconfig
|
||||
import { SetCamera } from '@/jlmap3d/config/SetCamera';
|
||||
import { SetRender } from '@/jlmap3d/config/SetRender';
|
||||
import { SetScene } from '@/jlmap3d/config/SetScene';
|
||||
import { SetLights } from '@/jlmap3d/config/SetLights';
|
||||
|
||||
//controls
|
||||
import { OrbitControls } from '@/jlmap3d/main/control/OrbitControls';
|
||||
// import { DragControls } from '@/jlmap3d/main/control/DragControls';
|
||||
|
||||
//加载器
|
||||
import { SimulationLoad } from '@/jlmap3d/main/loaders/SimulationLoad';
|
||||
import { SimulationLoadNew } from '@/jlmap3d/main/loaders/SimulationLoadNew';
|
||||
|
||||
//connect
|
||||
import {Jlmap3dSubscribe } from '@/jlmap3d/jl3dsimulation/connect/Jlmap3dSubscribe';
|
||||
import {Jlmap3dSubscribeNew } from '@/jlmap3d/jl3dsimulation/connect/Jlmap3dSubscribeNew';
|
||||
|
||||
import { getPublishMapVersion, getPublishMapDetail,getPublish3dMapDetail} from '@/api/jlmap3d/load3ddata';
|
||||
|
||||
//utils
|
||||
// import { UpdateTrain } from '@/jlmap3d/main/utils/UpdateTrain';
|
||||
import { UpdateTrain } from '@/jlmap3d/jl3dsimulation/connect/UpdateTrainTest';
|
||||
import { UpdateTrainNew } from '@/jlmap3d/jl3dsimulation/connect/UpdateTrainNew';
|
||||
// import { ReStart } from '@/jlmap3d/main/utils/ReStart';
|
||||
|
||||
import {Stats} from '@/jlmap3d/main/lib/stats.min.js';
|
||||
|
||||
var clock = new THREE.Clock();
|
||||
|
||||
export function JLmap3dMaintainer(dom, data,skinCode,storemod,routegroup,project) {
|
||||
|
||||
|
||||
let scope = this;
|
||||
|
||||
this.dom = dom;
|
||||
//初始化webgl渲染
|
||||
let renderer = SetRender(dom);
|
||||
renderer.domElement.style.position = "absolute";
|
||||
renderer.domElement.style.top = "0";
|
||||
document.getElementById('testjlmap3d').appendChild(renderer.domElement);
|
||||
//定义相机
|
||||
let camera = SetCamera(dom);
|
||||
//定义场景(渲染容器)
|
||||
let scene = SetScene(project);
|
||||
let scenesimulation = new THREE.Group();
|
||||
let scenestation = new THREE.Group();
|
||||
scene.add(scenesimulation);
|
||||
scene.add(scenestation);
|
||||
//定义镜头操作
|
||||
let controls = new THREE.OrbitControls(camera);
|
||||
controls.maxPolarAngle = Math.PI/2;
|
||||
// controls.screenSpacePanning = true;
|
||||
//controls.minPolarAngle = Math.PI/8;
|
||||
controls.maxDistance = 1000;
|
||||
//模型加载器
|
||||
this.assetloader = new AssetLoader();
|
||||
//替换材质组,例:信号机不同灯光
|
||||
this.materiallist = [];
|
||||
//替换材质组(站台的)
|
||||
this.stationtexture = [];
|
||||
//初始化场景线框和灯光 暂时
|
||||
SetLights(scene);
|
||||
//点击选中的模型
|
||||
this.selectmodel = null;
|
||||
//鼠标点击模型切换
|
||||
this.raycasterswitch = "null";
|
||||
//选中物体描边方框
|
||||
this.helpbox = null;
|
||||
//车门,站台门道岔动画构造器
|
||||
this.mixers = [];
|
||||
//模型操作命令组
|
||||
this.actions = {};
|
||||
|
||||
let sectionlist = null;
|
||||
let linklist = null;
|
||||
let signallist = null;
|
||||
let stationstandlist = null;
|
||||
let trainlisttest = null;
|
||||
let realsectionlist = null;
|
||||
let rails = null;
|
||||
|
||||
let camerarail = {
|
||||
curve:null,
|
||||
progress:0,
|
||||
moveswitch:false
|
||||
};
|
||||
//地图模型数据
|
||||
let mapdata = new Jl3ddata();
|
||||
//订阅仿真socket
|
||||
// console.log(routegroup);
|
||||
// this.Subscribe = new Jlmap3dSubscribe(scope,routegroup,scope.jsonwebwork);
|
||||
//连接到通信
|
||||
//console.log(this.Subscribe.config);
|
||||
|
||||
this.webwork = new Worker("../../static/workertest/trainworker.js");
|
||||
//初始化加载数据和模型getPublishMapDetail
|
||||
getPublishMapDetail(skinCode).then(data => {
|
||||
let mapnetdata = data.data;
|
||||
getPublish3dMapDetail(skinCode).then(netdata => {
|
||||
let assetsdata = JSON.parse(netdata.data.sections);
|
||||
if(assetsdata.link){
|
||||
scope.datatype = "old";
|
||||
scope.jsonwebwork = new Worker("../../static/workertest/jsonworker.js");
|
||||
scope.Subscribe = new Jlmap3dSubscribe(scope,routegroup,scope.jsonwebwork);
|
||||
scope.Subscribe.socketon(scope.Subscribe.topic);
|
||||
SimulationLoad(mapnetdata,scope,netdata.data,mapdata,camera,controls,scenesimulation,storemod);
|
||||
|
||||
}else{
|
||||
scope.datatype = "new";
|
||||
scope.jsonwebworknew = new Worker("../../static/workertest/jsonworkernew.js");
|
||||
scope.Subscribe = new Jlmap3dSubscribeNew(scope,routegroup,scope.jsonwebworknew);
|
||||
scope.Subscribe.socketon(scope.Subscribe.topic);
|
||||
SimulationLoadNew(mapnetdata,scope,netdata.data,mapdata,camera,controls,scenesimulation,storemod);
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
//
|
||||
// let stats = new Stats();
|
||||
// dom.appendChild( stats.dom );
|
||||
|
||||
// var timer = setInterval(function() {
|
||||
// if(trainlisttest){
|
||||
// if(trainlisttest.group){
|
||||
// if(trainlisttest.group.children[0]){
|
||||
// for(let k in rails.switchrail){
|
||||
// const ddd = storemod.getters['map/getDeviceByCode'](k);
|
||||
// let switchdata = rails.switchrail[k];
|
||||
// rails.switchrail[k].locateType = ddd.locateType;
|
||||
//
|
||||
// if(ddd.locateType == "01"){
|
||||
// //1--向左 2--向右
|
||||
// //__\__ __/__
|
||||
// if(rails.switchrail[k].directtype == "1"){
|
||||
// rails.linkrail[switchdata.alink].lconnect = switchdata.blink;
|
||||
// rails.linkrail[switchdata.blink].rconnect = switchdata.alink;
|
||||
// }else if(rails.switchrail[k].directtype == "2"){
|
||||
// rails.linkrail[switchdata.alink].rconnect = switchdata.blink;
|
||||
// rails.linkrail[switchdata.blink].lconnect = switchdata.alink;
|
||||
// }
|
||||
//
|
||||
// }else if(ddd.locateType == "02"){
|
||||
// if(rails.switchrail[k].directtype == "1"){
|
||||
// rails.linkrail[switchdata.alink].lconnect = switchdata.clink;
|
||||
// rails.linkrail[switchdata.clink].rconnect = switchdata.alink;
|
||||
// }else if(rails.switchrail[k].directtype == "2"){
|
||||
// rails.linkrail[switchdata.alink].rconnect = switchdata.clink;
|
||||
// rails.linkrail[switchdata.clink].lconnect = switchdata.alink;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// clearInterval(timer);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// }, 2000);
|
||||
//开启渲染
|
||||
animate();
|
||||
startWorker(scope.webwork);
|
||||
//动画时间
|
||||
let delta;
|
||||
//循环渲染函数
|
||||
function animate() {
|
||||
//循环渲染
|
||||
//requestAnimationFrame(animate);
|
||||
//renderer.setAnimationLoop(animate);
|
||||
requestAnimationFrame(animate);
|
||||
//判断渲染是否开启
|
||||
//根据相机渲染场景
|
||||
renderer.render(scene,camera);
|
||||
//检测动画构造器播放动画
|
||||
|
||||
// }
|
||||
// stats.update();
|
||||
}
|
||||
|
||||
function startWorker(webwork){
|
||||
if(typeof(Worker)!=="undefined"){
|
||||
|
||||
scope.webwork.onmessage = function (event) {
|
||||
//更新列车位置
|
||||
// if(scope.datatype == "new"){
|
||||
//
|
||||
// UpdateTrainNew(camera,trainlisttest);
|
||||
// }else{
|
||||
// UpdateTrain(camera,trainlisttest);
|
||||
// }
|
||||
|
||||
if(camerarail.moveswitch == true){
|
||||
// console.log(camerarail.progress);
|
||||
if(camerarail.progress>=0.99){
|
||||
camerarail.moveswitch = false;
|
||||
camerarail.curve = null;
|
||||
}else{
|
||||
let point = camerarail.curve.getPointAt(camerarail.progress);
|
||||
let tangent = camerarail.curve.getPointAt(camerarail.progress+0.001);
|
||||
camera.position.x = point.x;
|
||||
camera.position.y = point.y;
|
||||
camera.position.z = point.z;
|
||||
camerarail.progress += 0.003;
|
||||
// controls.target = new THREE.Vector3(point.x+1,point.y,point.z);
|
||||
controls.target = new THREE.Vector3(tangent.x,tangent.y,tangent.z);
|
||||
controls.update();
|
||||
point = null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
delta = clock.getDelta();
|
||||
for(let i=scope.mixers.length-1;i>=0;i--){
|
||||
if(scope.mixers[i]._actions[0].isRunning()){
|
||||
// console.log(scope.mixers[i]._actions[0].isRunning());
|
||||
scope.mixers[i].update( delta );
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
this.dispose = function(){
|
||||
renderer.setAnimationLoop(null);
|
||||
renderer.dispose();
|
||||
scene.dispose();
|
||||
controls.dispose();
|
||||
camera = null;
|
||||
scope.assetloader = null;
|
||||
|
||||
mapdata = null;
|
||||
scope.selectmodel = null;
|
||||
|
||||
scope.materiallist = null;
|
||||
scope.selectmodel = null;
|
||||
scope.helpbox = null;
|
||||
scope.mixers = null;
|
||||
scope.actions = null;
|
||||
scope.Subscribe = null;
|
||||
//console.log(scope);
|
||||
//scope = null;
|
||||
}
|
||||
|
||||
this.rayswitch = function(value){
|
||||
this.raycasterswitch = value;
|
||||
if(scope.helpbox){
|
||||
scene.remove( scope.helpbox );
|
||||
scope.helpbox = null;
|
||||
}
|
||||
};
|
||||
|
||||
this.showstationmsg = function(showtype){
|
||||
if(showtype == "show"){
|
||||
for(let st=0;st<stationstandlist.group.children.length;st++){
|
||||
stationstandlist.group.children[st].add(stationstandlist.textlist[st]);
|
||||
}
|
||||
}else{
|
||||
for(let st=0;st<stationstandlist.group.children.length;st++){
|
||||
stationstandlist.group.children[st].remove(stationstandlist.textlist[st]);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
this.showtrainmsg = function(showtype){
|
||||
if(showtype == "show"){
|
||||
for(let st=0;st<trainlisttest.textlist.length;st++){
|
||||
trainlisttest.list[trainlisttest.textlist[st].tcode].children[0].add(trainlisttest.textlist[st]);
|
||||
}
|
||||
}else{
|
||||
for(let st=0;st<trainlisttest.textlist.length;st++){
|
||||
trainlisttest.list[trainlisttest.textlist[st].tcode].children[0].remove(trainlisttest.textlist[st]);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// this.restart = function(){
|
||||
// ReStart(mapdata);
|
||||
// };
|
||||
|
||||
this.animateon = function(){
|
||||
controls.enabled = true;
|
||||
};
|
||||
|
||||
this.animateoff = function(){
|
||||
controls.enabled = false;
|
||||
};
|
||||
|
||||
this.loaderdata = function(loadsectionlist,loadlinklist,loadsignallist,loadstationstandlist,loadtrainlisttest,loadrealsectionlist,loadrails){
|
||||
|
||||
sectionlist = loadsectionlist;
|
||||
linklist = loadlinklist;
|
||||
signallist = loadsignallist;
|
||||
stationstandlist = loadstationstandlist;
|
||||
trainlisttest = loadtrainlisttest;
|
||||
realsectionlist = loadrealsectionlist;
|
||||
rails = loadrails;
|
||||
console.log(stationstandlist);
|
||||
scope.updatecamera(stationstandlist.group.children[0],"station");
|
||||
|
||||
}
|
||||
|
||||
this.eventon = function(){
|
||||
//raycaster交互模型点击事件
|
||||
document.getElementById("testjlmap3d").addEventListener( "mousedown", onselect, false );
|
||||
//窗口自适应
|
||||
window.addEventListener( 'resize', onWindowResize, false );
|
||||
|
||||
controls.update();
|
||||
};
|
||||
|
||||
this.eventoff = function(){
|
||||
//console.log("off");
|
||||
//raycaster交互模型点击事件
|
||||
document.getElementById("testjlmap3d").removeEventListener( "mousedown", onselect, false );
|
||||
//窗口自适应
|
||||
window.removeEventListener( 'resize', onWindowResize, false );
|
||||
};
|
||||
|
||||
this.updatecamera = function(mesh,type){
|
||||
//console.log(mesh);
|
||||
if(type == "station"){
|
||||
camera.position.x = mesh.position.x;
|
||||
camera.position.y = mesh.position.y+800;
|
||||
camera.position.z = mesh.position.z+300;
|
||||
//更新相机方向
|
||||
controls.target = new THREE.Vector3(mesh.position.x,mesh.position.y,mesh.position.z);
|
||||
}
|
||||
if(type == "train"){
|
||||
camera.position.x = mesh.position.x;
|
||||
camera.position.y = mesh.position.y+800;
|
||||
camera.position.z = mesh.children[2].matrixWorld.elements[14]+300;
|
||||
//更新相机方向
|
||||
controls.target = new THREE.Vector3(mesh.position.x,mesh.position.y,mesh.children[2].matrixWorld.elements[14]);
|
||||
}
|
||||
|
||||
if(stationstandlist && trainlisttest){
|
||||
controls.upmodeldirect(stationstandlist,trainlisttest);
|
||||
}
|
||||
controls.update();
|
||||
}
|
||||
|
||||
function onWindowResize() {
|
||||
//窗口自适应
|
||||
camera.aspect = window.innerWidth / window.innerHeight;
|
||||
camera.updateProjectionMatrix();
|
||||
renderer.setSize( window.innerWidth, window.innerHeight );
|
||||
}
|
||||
|
||||
//三维交互点击事件函数
|
||||
function onselect(event) {
|
||||
if(event.button == "0"){
|
||||
|
||||
//定义光线
|
||||
let raycaster = new THREE.Raycaster();
|
||||
//定义平面鼠标点击坐标
|
||||
let mouse = new THREE.Vector2();
|
||||
mouse.x = (event.clientX / window.innerWidth) * 2 - 1;
|
||||
mouse.y = -(event.clientY / window.innerHeight) * 2 + 1;
|
||||
|
||||
raycaster.setFromCamera( mouse, camera );
|
||||
if(scope.helpbox){
|
||||
scene.remove( scope.helpbox );
|
||||
scope.helpbox = null;
|
||||
}
|
||||
|
||||
if(scope.raycasterswitch == "stand"){
|
||||
//从站台对象组获取点击目标
|
||||
let intersects1 = raycaster.intersectObjects( stationstandlist.textlist);
|
||||
//获取最近处点击到的模型对象
|
||||
if(intersects1[0]){
|
||||
//遍历对象组获取对象坐标更新相机数据
|
||||
for(let j=0;j<stationstandlist.list.length;j++){
|
||||
if(intersects1[0].object.name == stationstandlist.list[j].mesh.code){
|
||||
camera.position.x = stationstandlist.list[j].mesh.position.x;
|
||||
camera.position.y = stationstandlist.list[j].mesh.position.y+200;
|
||||
camera.position.z = stationstandlist.list[j].mesh.position.z+300;
|
||||
//更新相机方向
|
||||
controls.target = new THREE.Vector3(stationstandlist.list[j].mesh.position.x,stationstandlist.list[j].mesh.position.y,stationstandlist.list[j].mesh.position.z);
|
||||
controls.update();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(scope.raycasterswitch == "train"){
|
||||
let intersects = raycaster.intersectObjects( trainlisttest.textlist);
|
||||
if(intersects[0]){
|
||||
for(let j=0;j<trainlisttest.list.length;j++){
|
||||
if(intersects[0].object.name == trainlisttest.list[j].name){
|
||||
// console.log(trainlisttest.list[j].position.x);
|
||||
// console.log(trainlisttest.list[j].position.y);
|
||||
// console.log(trainlisttest.list[j].children[2].matrixWorld.elements[14]);
|
||||
camera.position.x = trainlisttest.list[j].position.x;
|
||||
camera.position.y = 200;
|
||||
camera.position.z = trainlisttest.list[j].children[2].matrixWorld.elements[14]+300;
|
||||
//console.log(camera.position);
|
||||
controls.target = new THREE.Vector3(trainlisttest.list[j].children[2].matrixWorld.elements[12],trainlisttest.list[j].children[2].matrixWorld.elements[13],trainlisttest.list[j].children[2].matrixWorld.elements[14]);
|
||||
controls.update();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(scope.raycasterswitch == "section"){
|
||||
console.log(sectionlist);
|
||||
console.log(linklist);
|
||||
//console.log(sectionlist.sections.modellist);
|
||||
let intersects = raycaster.intersectObjects( linklist.linksgroup.children,true);
|
||||
if(intersects[0]){
|
||||
// console.log(intersects[0].object);
|
||||
scope.helpbox = new THREE.BoxHelper( intersects[0].object, 0xff0000 );
|
||||
scene.add( scope.helpbox );
|
||||
}
|
||||
}
|
||||
|
||||
if(scope.raycasterswitch == "signal"){
|
||||
console.log(signallist);
|
||||
let intersects = raycaster.intersectObjects( signallist.group.children,true);
|
||||
|
||||
if(intersects[0]){
|
||||
// console.log(intersects[0].object.matrixWorld);
|
||||
scope.helpbox = new THREE.BoxHelper( intersects[0].object, 0xff0000 );
|
||||
scene.add( scope.helpbox );
|
||||
}
|
||||
}
|
||||
|
||||
if(scope.raycasterswitch == "switch"){
|
||||
console.log(sectionlist);
|
||||
let intersects = raycaster.intersectObjects( sectionlist.switchs.modellist,true);
|
||||
|
||||
if(intersects[0]){
|
||||
scope.helpbox = new THREE.BoxHelper( intersects[0].object, 0xff0000 );
|
||||
|
||||
scene.add( scope.helpbox );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//相机轨迹动画
|
||||
this.camerarailmove = function(){
|
||||
camerarail.moveswitch = true;
|
||||
camerarail.progress = 0;
|
||||
let points = [];
|
||||
let stationp1 = stationstandlist.group.children[0].position;
|
||||
let stationp2 = stationstandlist.group.children[20].position;
|
||||
//全线漫游
|
||||
// points.push(new THREE.Vector3(stationp1.x-20,10,stationp1.z));
|
||||
// points.push(new THREE.Vector3(stationp2.x+20,10,stationp2.z));
|
||||
//站内漫游(晕)
|
||||
// points.push(new THREE.Vector3(stationp1.x-65,11,stationp1.z+15));
|
||||
// points.push(new THREE.Vector3(stationp1.x,11,stationp1.z+15));
|
||||
// points.push(new THREE.Vector3(stationp1.x+5,11,stationp1.z+6));
|
||||
// points.push(new THREE.Vector3(stationp1.x+5,11,stationp1.z-15));
|
||||
// points.push(new THREE.Vector3(stationp1.x+38,11,stationp1.z-15));
|
||||
// points.push(new THREE.Vector3(stationp1.x+38,11,stationp1.z+2));
|
||||
// points.push(new THREE.Vector3(stationp1.x+13,5,stationp1.z+2));
|
||||
|
||||
points.push(new THREE.Vector3(stationp1.x-65,11,stationp1.z+12));
|
||||
points.push(new THREE.Vector3(stationp1.x+60,11,stationp1.z+12));
|
||||
points.push(new THREE.Vector3(stationp1.x+60,7,stationp1.z+12));
|
||||
points.push(new THREE.Vector3(stationp1.x-55,5,stationp1.z+12));
|
||||
// points.push(new THREE.Vector3(stationp1.x+40,3,stationp1.z+15));
|
||||
// controls.target = new THREE.Vector3(camera.position.x+1,camera.position.y,camera.position.z);
|
||||
// controls.update();
|
||||
camerarail.curve = new THREE.CatmullRomCurve3(points);
|
||||
|
||||
}
|
||||
}
|
@ -110,8 +110,8 @@ var views = [
|
||||
width: 0.5,
|
||||
height: 0.5,
|
||||
background: new THREE.Color( 0.7, 0.5, 0.5 ),
|
||||
eye: [ -8, 5,0],
|
||||
up: [ -9, 5,-0.1 ],
|
||||
eye: [ -60, 6,11],
|
||||
up: [ -59, 5.9,11 ],
|
||||
fov: 45
|
||||
},
|
||||
{
|
||||
|
@ -58,7 +58,6 @@ export function Jlmap3dSubscribeNew(jlmap3d,routegroup,jsonwebwork) {
|
||||
// // console.log(event.data);
|
||||
//
|
||||
// }
|
||||
|
||||
if(event.data.type == "Device_Load_Destroy_3D"){
|
||||
DeviceDestroy(event.data);
|
||||
return;
|
||||
@ -341,7 +340,7 @@ export function Jlmap3dSubscribeNew(jlmap3d,routegroup,jsonwebwork) {
|
||||
}
|
||||
function trainrun(data){
|
||||
let code = data.code;
|
||||
console.log(data);
|
||||
// console.log(data);
|
||||
if(trainlisttest.list[code].dispose == "0"){
|
||||
if(trainlisttest.list[code].curve == null){
|
||||
if (data.right == '1') { // 向右
|
||||
@ -696,8 +695,8 @@ export function Jlmap3dSubscribeNew(jlmap3d,routegroup,jsonwebwork) {
|
||||
signallist.list[code].mesh.getObjectByName("red").material.map = materials[0];
|
||||
signallist.list[code].mesh.getObjectByName("red").material.map.needsUpdate = true;
|
||||
}else{
|
||||
signallist.list[code].mesh.getObjectByName("green").material.map = materials[3];
|
||||
signallist.list[code].mesh.getObjectByName("green").material.map.needsUpdate = true;
|
||||
signallist.list[code].mesh.getObjectByName("red").material.map = materials[3];
|
||||
signallist.list[code].mesh.getObjectByName("red").material.map.needsUpdate = true;
|
||||
}
|
||||
|
||||
if(data.yellow == 1){
|
||||
|
@ -207,45 +207,44 @@ export function AssetLoader(){
|
||||
}
|
||||
|
||||
this.setmodellistnew = function (data,trainoffset){
|
||||
|
||||
if(trainoffset){
|
||||
scope.trainoffset = trainoffset;
|
||||
}
|
||||
let defaultmodel1 = new AssetModel(defaultsignal);
|
||||
scope.modellist.push(defaultmodel1);
|
||||
|
||||
let defaultmodel2 = new AssetModel(defaulttrain);
|
||||
scope.modellist.push(defaultmodel2);
|
||||
|
||||
let station = new AssetModel(defaultstation);
|
||||
scope.modellist.push(station);
|
||||
|
||||
let wstation = new AssetModel(waicestation);
|
||||
scope.modellist.push(wstation);
|
||||
|
||||
let s3 = new AssetModel(station3);
|
||||
scope.modellist.push(s3);
|
||||
|
||||
let hebsd = new AssetModel(hebsuidao);
|
||||
scope.modellist.push(hebsd);
|
||||
|
||||
let nbsd = new AssetModel(nbsuidao);
|
||||
scope.modellist.push(nbsd);
|
||||
|
||||
|
||||
let defaultswitch1 = new AssetModel(autoswitch1);
|
||||
scope.modellist.push(defaultswitch1);
|
||||
|
||||
let defaultswitch2 = new AssetModel(autoswitch2);
|
||||
scope.modellist.push(defaultswitch2);
|
||||
// let defaultmodel1 = new AssetModel(defaultsignal);
|
||||
// scope.modellist.push(defaultmodel1);
|
||||
//
|
||||
// let defaultmodel2 = new AssetModel(defaulttrain);
|
||||
// scope.modellist.push(defaultmodel2);
|
||||
//
|
||||
// let station = new AssetModel(defaultstation);
|
||||
// scope.modellist.push(station);
|
||||
//
|
||||
// let wstation = new AssetModel(waicestation);
|
||||
// scope.modellist.push(wstation);
|
||||
//
|
||||
// let s3 = new AssetModel(station3);
|
||||
// scope.modellist.push(s3);
|
||||
//
|
||||
// let hebsd = new AssetModel(hebsuidao);
|
||||
// scope.modellist.push(hebsd);
|
||||
//
|
||||
// let nbsd = new AssetModel(nbsuidao);
|
||||
// scope.modellist.push(nbsd);
|
||||
//
|
||||
//
|
||||
// let defaultswitch1 = new AssetModel(autoswitch1);
|
||||
// scope.modellist.push(defaultswitch1);
|
||||
//
|
||||
// let defaultswitch2 = new AssetModel(autoswitch2);
|
||||
// scope.modellist.push(defaultswitch2);
|
||||
|
||||
let modeldata = JSON.parse(data);
|
||||
|
||||
for(let j=0;j<modeldata.length;j++){
|
||||
for(let j=0;j<modeldata.assets.length;j++){
|
||||
let had = false;
|
||||
for(let i=0;i<scope.modellist.length;i++){
|
||||
|
||||
|
||||
if(scope.modellist[i].id == modeldata[j].id){
|
||||
if(scope.modellist[i].id == modeldata.assets[j].id){
|
||||
|
||||
had = true;
|
||||
|
||||
@ -255,8 +254,9 @@ export function AssetLoader(){
|
||||
}
|
||||
|
||||
if(had == false){
|
||||
let model = new AssetModel(modeldata[j]);
|
||||
scope.modellist.push(modeldata[j]);
|
||||
let model = new AssetModel(modeldata.assets[j]);
|
||||
scope.modellist.push(modeldata.assets[j]);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ import { Loading } from 'element-ui';
|
||||
|
||||
export function DriverLoadNew(data,scope,netdata,mapdata,sectionlist,signallist,switchlist,stationstandlist,trainlisttest,rails,camera,controls,scene,mixerss){
|
||||
//console.log(mapdata);
|
||||
Materialload(scope);
|
||||
|
||||
//console.log(data);
|
||||
//console.log(scope);
|
||||
let sceneload = scene;
|
||||
@ -49,12 +49,9 @@ export function DriverLoadNew(data,scope,netdata,mapdata,sectionlist,signallist,
|
||||
}
|
||||
|
||||
function initnew3d(data,netdata){
|
||||
// console.log(data);
|
||||
// console.log(netdata);
|
||||
Materialload(scope,JSON.parse(netdata.assets));
|
||||
let mapdata = data;
|
||||
//初始化轨道和道岔
|
||||
// lengthfact(data);
|
||||
|
||||
// linklist = new LinkList();
|
||||
sectionlist = new SectionListN();
|
||||
signallist = new SignalListN();
|
||||
@ -110,38 +107,28 @@ export function DriverLoadNew(data,scope,netdata,mapdata,sectionlist,signallist,
|
||||
.then(function(data){
|
||||
return new Promise(function(resolve, reject){
|
||||
|
||||
|
||||
if(stationstandlist.group.children[0].name == "Station18398"){
|
||||
let netasset = JSON.parse(netdata.assets);
|
||||
if(netasset.istexture){
|
||||
for(let mm=0;mm< stationstandlist.group.children.length;mm++){
|
||||
if(stationstandlist.group.children[mm].name != "Station96090"){
|
||||
let stationname = stationstandlist.group.children[mm].name;
|
||||
|
||||
stationstandlist.group.children[mm].getObjectByName("zhantailiebiao").material.map =scope.stationtexture["haerbinlist"];
|
||||
stationstandlist.group.children[mm].getObjectByName("zhantailiebiao").material.map =scope.stationtexture["stationlist"];
|
||||
stationstandlist.group.children[mm].getObjectByName("zhantailiebiao").material.map.needsUpdate = true;
|
||||
|
||||
let newmaterial = stationstandlist.group.children[mm].getObjectByName("zhantaiming").material.clone();
|
||||
newmaterial.map =scope.stationtexture[stationname];
|
||||
stationstandlist.group.children[mm].getObjectByName("zhantaiming").material = newmaterial;
|
||||
stationstandlist.group.children[mm].getObjectByName("zhantaiming").material.map.needsUpdate = true;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
for(let mn=0;mn<scope.assetloader.modellist.length;mn++){
|
||||
if(scope.assetloader.modellist[mn].name && scope.assetloader.modellist[mn].name == "hebsuidao"){
|
||||
scope.assetloader.modellist[mn].mesh.name = "hebsuidao";
|
||||
scene.add(scope.assetloader.modellist[mn].mesh);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(stationstandlist.group.children[0].name == "Station75414"){
|
||||
for(let mn=0;mn<scope.assetloader.modellist.length;mn++){
|
||||
if(scope.assetloader.modellist[mn].name && scope.assetloader.modellist[mn].name == "nbsuidao"){
|
||||
scope.assetloader.modellist[mn].mesh.name = "nbsuidao";
|
||||
scene.add(scope.assetloader.modellist[mn].mesh);
|
||||
}
|
||||
}
|
||||
|
||||
for(let mn=0;mn<scope.assetloader.modellist.length;mn++){
|
||||
if(scope.assetloader.modellist[mn].deviceType && scope.assetloader.modellist[mn].deviceType == "suidaobg"){
|
||||
// scope.assetloader.modellist[mn].mesh.deviceType = "suidaobg";
|
||||
scene.add(scope.assetloader.modellist[mn].mesh);
|
||||
}
|
||||
}
|
||||
|
||||
resolve("mergemodel");
|
||||
});
|
||||
})
|
||||
|
@ -1,5 +1,4 @@
|
||||
export function Materialload(jlmap3dedit){
|
||||
|
||||
export function Materialload(jlmap3dedit,assettype){
|
||||
|
||||
settexture(jlmap3dedit.materiallist,"red",'../../static/material/signal/1.jpg');
|
||||
|
||||
@ -8,33 +7,68 @@ export function Materialload(jlmap3dedit){
|
||||
settexture( jlmap3dedit.materiallist,"green",'../../static/material/signal/3.jpg');
|
||||
|
||||
settexture( jlmap3dedit.materiallist,"black",'../../static/material/signal/5.jpg');
|
||||
if(jlmap3dedit.stationtexture){
|
||||
setstationtexture(jlmap3dedit.stationtexture,"haerbinlist",'../../static/texture/heb/haerbinlist.jpg');
|
||||
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station5361",'../../static/texture/heb/Station5361.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station11094",'../../static/texture/heb/Station11094.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station11136",'../../static/texture/heb/Station11136.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station17293",'../../static/texture/heb/Station17293.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station18398",'../../static/texture/heb/Station18398.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station22163",'../../static/texture/heb/Station22163.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station25464",'../../static/texture/heb/Station25464.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station28090",'../../static/texture/heb/Station28090.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station41999",'../../static/texture/heb/Station41999.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station44338",'../../static/texture/heb/Station44338.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station46464",'../../static/texture/heb/Station46464.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station50565",'../../static/texture/heb/Station50565.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station60068",'../../static/texture/heb/Station60068.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station62429",'../../static/texture/heb/Station62429.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station64444",'../../static/texture/heb/Station64444.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station71700",'../../static/texture/heb/Station71700.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station72132",'../../static/texture/heb/Station72132.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station78164",'../../static/texture/heb/Station78164.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station79537",'../../static/texture/heb/Station79537.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station82618",'../../static/texture/heb/Station82618.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station85520",'../../static/texture/heb/Station85520.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station89483",'../../static/texture/heb/Station89483.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station96090",'../../static/texture/heb/Station96090.jpg');
|
||||
if(assettype.stationtexture == "xian3"){
|
||||
if(jlmap3dedit.stationtexture){
|
||||
setstationtexture(jlmap3dedit.stationtexture,"stationlist",'../../static/texture/xian3/xian3list.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station18000",'../../static/texture/xian3/Station18000.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station61238",'../../static/texture/xian3/Station61238.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station41790",'../../static/texture/xian3/Station41790.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station67945",'../../static/texture/xian3/Station67945.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station85598",'../../static/texture/xian3/Station85598.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station4324",'../../static/texture/xian3/Station4324.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station55755",'../../static/texture/xian3/Station55755.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station53597",'../../static/texture/xian3/Station53597.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station68029",'../../static/texture/xian3/Station68029.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station17596",'../../static/texture/xian3/Station17596.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station66742",'../../static/texture/xian3/Station66742.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station90701",'../../static/texture/xian3/Station90701.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station90652",'../../static/texture/xian3/Station90652.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station54200",'../../static/texture/xian3/Station54200.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station19253",'../../static/texture/xian3/Station19253.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station37821",'../../static/texture/xian3/Station37821.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station47557",'../../static/texture/xian3/Station47557.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station78551",'../../static/texture/xian3/Station78551.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station64474",'../../static/texture/xian3/Station64474.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station21203",'../../static/texture/xian3/Station21203.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station34499",'../../static/texture/xian3/Station34499.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station571",'../../static/texture/xian3/Station571.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station99903",'../../static/texture/xian3/Station99903.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station43447",'../../static/texture/xian3/Station43447.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station67917",'../../static/texture/xian3/Station67917.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station60649",'../../static/texture/xian3/Station60649.jpg');
|
||||
}
|
||||
}
|
||||
if(assettype.stationtexture == "haerbin1"){
|
||||
if(jlmap3dedit.stationtexture){
|
||||
setstationtexture(jlmap3dedit.stationtexture,"stationlist",'../../static/texture/heb/haerbinlist.jpg');
|
||||
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station5361",'../../static/texture/heb/Station5361.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station11094",'../../static/texture/heb/Station11094.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station11136",'../../static/texture/heb/Station11136.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station17293",'../../static/texture/heb/Station17293.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station18398",'../../static/texture/heb/Station18398.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station22163",'../../static/texture/heb/Station22163.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station25464",'../../static/texture/heb/Station25464.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station28090",'../../static/texture/heb/Station28090.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station41999",'../../static/texture/heb/Station41999.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station44338",'../../static/texture/heb/Station44338.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station46464",'../../static/texture/heb/Station46464.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station50565",'../../static/texture/heb/Station50565.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station60068",'../../static/texture/heb/Station60068.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station62429",'../../static/texture/heb/Station62429.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station64444",'../../static/texture/heb/Station64444.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station71700",'../../static/texture/heb/Station71700.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station72132",'../../static/texture/heb/Station72132.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station78164",'../../static/texture/heb/Station78164.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station79537",'../../static/texture/heb/Station79537.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station82618",'../../static/texture/heb/Station82618.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station85520",'../../static/texture/heb/Station85520.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station89483",'../../static/texture/heb/Station89483.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station96090",'../../static/texture/heb/Station96090.jpg');
|
||||
}
|
||||
}
|
||||
|
||||
//console.log(jlmap3dedit.materiallist);
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,7 @@ import { Loading } from 'element-ui';
|
||||
|
||||
export function SimulationLoadNew(data,scope,netdata,mapdata,camera,controls,scene){
|
||||
//console.log(mapdata);
|
||||
Materialload(scope);
|
||||
|
||||
//console.log(data);
|
||||
//console.log(scope);
|
||||
let sceneload = scene;
|
||||
@ -47,7 +47,7 @@ export function SimulationLoadNew(data,scope,netdata,mapdata,camera,controls,sce
|
||||
}
|
||||
|
||||
function initnew3d(data,netdata){
|
||||
|
||||
Materialload(scope,JSON.parse(netdata.assets));
|
||||
let mapdata = data;
|
||||
//初始化轨道和道岔
|
||||
// lengthfact(data);
|
||||
@ -108,34 +108,35 @@ export function SimulationLoadNew(data,scope,netdata,mapdata,camera,controls,sce
|
||||
return new Promise(function(resolve, reject){
|
||||
|
||||
//
|
||||
if(stationstandlist.group.children[0].name == "Station18398"){
|
||||
let netasset = JSON.parse(netdata.assets);
|
||||
if(netasset.istexture){
|
||||
for(let mm=0;mm< stationstandlist.group.children.length;mm++){
|
||||
if(stationstandlist.group.children[mm].name != "Station96090"){
|
||||
let stationname = stationstandlist.group.children[mm].name;
|
||||
stationstandlist.group.children[mm].getObjectByName("zhantailiebiao").material.map =scope.stationtexture["haerbinlist"];
|
||||
stationstandlist.group.children[mm].getObjectByName("zhantailiebiao").material.map =scope.stationtexture["stationlist"];
|
||||
stationstandlist.group.children[mm].getObjectByName("zhantailiebiao").material.map.needsUpdate = true;
|
||||
let newmaterial = stationstandlist.group.children[mm].getObjectByName("zhantaiming").material.clone();
|
||||
newmaterial.map =scope.stationtexture[stationname];
|
||||
stationstandlist.group.children[mm].getObjectByName("zhantaiming").material = newmaterial;
|
||||
stationstandlist.group.children[mm].getObjectByName("zhantaiming").material.map.needsUpdate = true;
|
||||
}
|
||||
|
||||
}
|
||||
for(let mn=0;mn<scope.assetloader.modellist.length;mn++){
|
||||
if(scope.assetloader.modellist[mn].name && scope.assetloader.modellist[mn].name == "hebsuidao"){
|
||||
scope.assetloader.modellist[mn].mesh.name = "hebsuidao";
|
||||
scene.add(scope.assetloader.modellist[mn].mesh);
|
||||
}
|
||||
}
|
||||
}
|
||||
console.log(stationstandlist.group.children[0].name );
|
||||
if(stationstandlist.group.children[0].name == "Station75414"){
|
||||
for(let mn=0;mn<scope.assetloader.modellist.length;mn++){
|
||||
if(scope.assetloader.modellist[mn].name && scope.assetloader.modellist[mn].name == "nbsuidao"){
|
||||
scope.assetloader.modellist[mn].mesh.name = "nbsuidao";
|
||||
scene.add(scope.assetloader.modellist[mn].mesh);
|
||||
}
|
||||
|
||||
}
|
||||
for(let mn=0;mn<scope.assetloader.modellist.length;mn++){
|
||||
if(scope.assetloader.modellist[mn].deviceType && scope.assetloader.modellist[mn].deviceType == "suidaobg"){
|
||||
// scope.assetloader.modellist[mn].mesh.deviceType = "suidaobg";
|
||||
scene.add(scope.assetloader.modellist[mn].mesh);
|
||||
}
|
||||
}
|
||||
// console.log(stationstandlist.group.children[0].name );
|
||||
// if(stationstandlist.group.children[0].name == "Station75414"){
|
||||
// for(let mn=0;mn<scope.assetloader.modellist.length;mn++){
|
||||
// if(scope.assetloader.modellist[mn].name && scope.assetloader.modellist[mn].name == "nbsuidao"){
|
||||
// scope.assetloader.modellist[mn].mesh.name = "nbsuidao";
|
||||
// scene.add(scope.assetloader.modellist[mn].mesh);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
resolve("mergemodel");
|
||||
});
|
||||
})
|
||||
|
@ -28,6 +28,17 @@ export function SignalListN() {
|
||||
}
|
||||
// console.log(signaldata[i]);
|
||||
let newmesh = selectmesh.clone(true);
|
||||
|
||||
for(let j=0;j<newmesh.children.length;j++){
|
||||
let newmaterial = new THREE.MeshPhongMaterial();
|
||||
newmaterial.copy(newmesh.children[j].material);
|
||||
|
||||
newmesh.children[j].material = newmaterial;
|
||||
newmesh.children[j].material.needsUpdate = true;
|
||||
newmaterial.dispose();
|
||||
// newmesh.children[j].material.map
|
||||
}
|
||||
|
||||
// newmesh.uuid = signaldata[i].id;
|
||||
for(let j=0;j<newmesh.children.length;j++){
|
||||
newmesh.children[j].code = signaldata[i].code;
|
||||
|
@ -173,6 +173,9 @@ export function StationStandListN() {
|
||||
}else{
|
||||
newstationmesh = selectmesh2.clone(true);
|
||||
}
|
||||
// console.log(standsdata[i].name);
|
||||
// console.log(standsdata[i].code);
|
||||
// console.log("==================");
|
||||
newstationmesh.code = standsdata[i].code;
|
||||
newstationmesh.name = standsdata[i].code;
|
||||
newstationmesh.position.x = standsdata[i].position.x;
|
||||
|
@ -558,7 +558,8 @@ class SkinCode extends defaultStyle {
|
||||
lrPadding: 1, // 两边间隔
|
||||
upPadding: 1, // 上边距离
|
||||
trainBodyFillColor: '#000000', // 列车车身填充颜色
|
||||
trainNameFormat: 'targetCode:serviceNumber:tripNumber'// 列车显示格式
|
||||
// targetCode:
|
||||
trainNameFormat: 'serviceNumber:tripNumber'// 列车显示格式
|
||||
},
|
||||
directionArrow: {
|
||||
},
|
||||
@ -610,6 +611,7 @@ class SkinCode extends defaultStyle {
|
||||
aspectRatio: 8 / 15, // 字体宽高比例(用以拼接text是计算位置)
|
||||
textOffset: 1, // 字体偏移(用以控制字体据车头的距离)
|
||||
trainWidthMoreText: 2, // 计算列车长度时--列车长比text多出尺寸
|
||||
useSelfFormat: true, // 使用配置项的nameFormat
|
||||
displayPosition: 'margin', // 非同通信车在物理区段(有逻辑区段)上显示的位置 margin:行驶方向边缘车次窗 center: 中间位置车次窗
|
||||
trainTip:true // 鼠标悬停列车状态信息框是否显示
|
||||
},
|
||||
|
@ -262,9 +262,6 @@ class Jlmap {
|
||||
const sectionC = this.mapDevice[item.sectionCCode];
|
||||
if (sectionA && sectionB && sectionC) {
|
||||
item['cutOff'] = sectionA.cutOff;
|
||||
item['sectionAstatus'] = sectionA.status;
|
||||
item['sectionBstatus'] = sectionB.status;
|
||||
item['sectionCstatus'] = sectionC.status;
|
||||
}
|
||||
}
|
||||
|
||||
@ -281,9 +278,6 @@ class Jlmap {
|
||||
const sectionC = this.mapDevice[swch.sectionCCode];
|
||||
if (sectionA && sectionB && sectionC) {
|
||||
swch['cutOff'] = sectionA.cutOff;
|
||||
swch['sectionAstatus'] = sectionA.status;
|
||||
swch['sectionBstatus'] = sectionB.status;
|
||||
swch['sectionCstatus'] = sectionC.status;
|
||||
}
|
||||
|
||||
this.$painter.update(swch);
|
||||
|
@ -254,4 +254,20 @@ export default class EAxle111 extends Group {
|
||||
this.add(this.circle);
|
||||
}
|
||||
}
|
||||
|
||||
setStyle(styles) {
|
||||
if (this.model.shape.isSpecial) {
|
||||
this.isogonInside.setStyle(styles);
|
||||
this.isogonOutside.setStyle(styles);
|
||||
this.line1.setStyle(styles);
|
||||
this.line2.setStyle(styles);
|
||||
this.line3.setStyle(styles);
|
||||
this.line4.setStyle(styles);
|
||||
this.line5.setStyle(styles);
|
||||
this.line6.setStyle(styles);
|
||||
} else {
|
||||
this.circle.setStyle(styles);
|
||||
}
|
||||
this.line.setStyle(styles);
|
||||
}
|
||||
}
|
||||
|
@ -524,7 +524,18 @@ export default class Section extends Group {
|
||||
this.remove(this.speedLimitLeft);
|
||||
this.remove(this.speedLimitRight);
|
||||
}
|
||||
|
||||
}
|
||||
if (this.leftAxle) {
|
||||
this.leftAxle.setStyle({
|
||||
stroke: this.style.Section.line.spareColor,
|
||||
fill: this.style.Section.line.spareColor
|
||||
});
|
||||
}
|
||||
if (this.rightAxle) {
|
||||
this.rightAxle.setStyle({
|
||||
stroke: this.style.Section.line.spareColor,
|
||||
fill: this.style.Section.line.spareColor
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -556,6 +567,18 @@ export default class Section extends Group {
|
||||
lineWidth: this.style.Section.line.width + this.style.Section.line.beyondWidth
|
||||
});
|
||||
}
|
||||
if (this.leftAxle) {
|
||||
this.leftAxle.setStyle({
|
||||
stroke: this.style.Section.line.communicationOccupiedColor,
|
||||
fill:this.style.Section.line.communicationOccupiedColor
|
||||
});
|
||||
}
|
||||
if (this.rightAxle) {
|
||||
this.rightAxle.setStyle({
|
||||
stroke: this.style.Section.line.communicationOccupiedColor,
|
||||
fill:this.style.Section.line.communicationOccupiedColor
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/** 非通信车占用状态 03*/
|
||||
@ -566,6 +589,18 @@ export default class Section extends Group {
|
||||
lineWidth: this.style.Section.line.width + this.style.Section.line.beyondWidth
|
||||
});
|
||||
}
|
||||
if (this.leftAxle) {
|
||||
this.leftAxle.setStyle({
|
||||
stroke: this.style.Section.line.unCommunicationOccupiedColor,
|
||||
fill:this.style.Section.line.unCommunicationOccupiedColor
|
||||
});
|
||||
}
|
||||
if (this.rightAxle) {
|
||||
this.rightAxle.setStyle({
|
||||
stroke: this.style.Section.line.unCommunicationOccupiedColor,
|
||||
fill:this.style.Section.line.unCommunicationOccupiedColor
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/** 进路锁闭 04*/
|
||||
|
@ -1,4 +1,4 @@
|
||||
import Isogon from 'zrender/src/graphic/shape/Isogon';
|
||||
import Polygon from 'zrender/src/graphic/shape/Polygon';
|
||||
import Group from 'zrender/src/container/Group';
|
||||
|
||||
class EVirtualSignal extends Group {
|
||||
@ -11,27 +11,28 @@ class EVirtualSignal extends Group {
|
||||
create() {
|
||||
const model = this.model;
|
||||
const style = this.model.style;
|
||||
const rotation = model.drict != 1 ? -Math.PI / 180 * Number(30) : Math.PI / 180 * Number(30);
|
||||
// const rotation = model.drict != 1 ? -Math.PI / 180 * Number(30) : Math.PI / 180 * Number(30);
|
||||
const drict = model.drict !== 1 ? -1 : 1;
|
||||
|
||||
this.lamp = new Isogon({
|
||||
this.lamp = new Polygon({
|
||||
name: model.index,
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
origin: [model.x, model.y],
|
||||
rotation: rotation,
|
||||
// origin: [model.x, model.y],
|
||||
// rotation: rotation,
|
||||
shape: {
|
||||
x: model.x,
|
||||
y: model.y,
|
||||
r: 6,
|
||||
n: 3
|
||||
points: [
|
||||
[model.x - (3 * drict), model.y + Math.sqrt(3) * 3],
|
||||
[model.x - (3 * drict), model.y - Math.sqrt(3) * 3],
|
||||
[model.x + 6 * drict, model.y]
|
||||
]
|
||||
},
|
||||
style: {
|
||||
lineWidth: style.Signal.lamp.borderWidth,
|
||||
lineWidth: style.Signal.lamp.borderWidth || 1,
|
||||
fill: style.Signal.lamp.borderColor,
|
||||
stroke: style.Signal.lamp.borderColor
|
||||
}
|
||||
});
|
||||
|
||||
this.add(this.lamp);
|
||||
}
|
||||
|
||||
|
@ -161,8 +161,8 @@ export default class Switch extends Group {
|
||||
z: this.z + 6,
|
||||
_subType: 'enabled', // 标识
|
||||
style: {
|
||||
x: arrowTextX,
|
||||
y: arrowTextY + 10,
|
||||
x: nameTextX,
|
||||
y: nameTextY + directy * 20,
|
||||
fontSize: 12,
|
||||
text: 'E',
|
||||
textAlign: 'center',
|
||||
@ -434,7 +434,7 @@ export default class Switch extends Group {
|
||||
}
|
||||
|
||||
sectionCutOff(section) {
|
||||
const lineWidth = this.style.Section.line.width + (this.model.sectionAstatus != '01' ? this.style.Section.line.beyondWidth : 0);
|
||||
const lineWidth = this.style.Section.line.width;
|
||||
if (section) {
|
||||
section.animateStyle(true, [
|
||||
{ time: 0, styles: { lineWidth: lineWidth } },
|
||||
|
@ -5,6 +5,7 @@
|
||||
<speed-limit-control ref="speedLimitControl" />
|
||||
<alxe-effective ref="alxeEffective" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<set-fault ref="setFault" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -21,6 +22,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import {menuOperate, commitOperate} from './utils/menuOperate';
|
||||
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
|
||||
|
||||
export default {
|
||||
name: 'SectionMenu',
|
||||
@ -29,7 +31,8 @@ export default {
|
||||
SectionControl,
|
||||
SpeedLimitControl,
|
||||
AlxeEffective,
|
||||
NoticeInfo
|
||||
NoticeInfo,
|
||||
SetFault
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
@ -72,11 +75,16 @@ export default {
|
||||
]
|
||||
},
|
||||
menuForce: [
|
||||
// {
|
||||
// label: '设置计轴失效',
|
||||
// handler: this.alxeFailure
|
||||
// // disabledCallback: MenuDisabledState.Section.alxeFailure
|
||||
// }
|
||||
{
|
||||
label: '设置故障',
|
||||
handler: this.setStoppage,
|
||||
cmdType: CMD.Fault.CMD_SET_FAULT
|
||||
},
|
||||
{
|
||||
label: '取消故障',
|
||||
handler: this.cancelStoppage,
|
||||
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
@ -234,6 +242,22 @@ export default {
|
||||
this.$refs.speedLimitControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -7,6 +7,7 @@
|
||||
<route-detail ref="routeDetail" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<password-box ref="password" @checkOver="passWordCommit" />
|
||||
<set-fault ref="setFault" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -26,6 +27,7 @@ import { DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from './utils/menuItemStatus';
|
||||
import PasswordBox from './dialog/childDialog/passwordInputBox.vue';
|
||||
import {menuOperate, commitOperate} from './utils/menuOperate';
|
||||
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
|
||||
|
||||
export default {
|
||||
name: 'SignalMenu',
|
||||
@ -36,7 +38,8 @@ export default {
|
||||
RouteHandControl,
|
||||
RouteDetail,
|
||||
NoticeInfo,
|
||||
PasswordBox
|
||||
PasswordBox,
|
||||
SetFault
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
@ -91,21 +94,16 @@ export default {
|
||||
]
|
||||
},
|
||||
menuForce: [
|
||||
{
|
||||
label: '信号关灯',
|
||||
handler: this.signalClose,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
|
||||
},
|
||||
{
|
||||
label: '设置故障',
|
||||
handler: this.setStoppage,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_ADD_FAULT
|
||||
},
|
||||
{
|
||||
label: '取消故障',
|
||||
handler: this.cancelStoppage,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_REMOVE_FAULT
|
||||
}
|
||||
{
|
||||
label: '设置故障',
|
||||
handler: this.setStoppage,
|
||||
cmdType: CMD.Fault.CMD_SET_FAULT
|
||||
},
|
||||
{
|
||||
label: '取消故障',
|
||||
handler: this.cancelStoppage,
|
||||
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
@ -284,50 +282,18 @@ export default {
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
const operate = {
|
||||
start: true,
|
||||
over: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Signal.stoppage.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_ADD_FAULT,
|
||||
param: {
|
||||
signalCode: `${this.selected.code}`
|
||||
}
|
||||
|
||||
};
|
||||
mouseCancelState(this.selected);
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
const operate = {
|
||||
start: true,
|
||||
over: true,
|
||||
code: this.selected.code,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_REMOVE_FAULT,
|
||||
operation: OperationEvent.Signal.cancelStoppage.menu.operation,
|
||||
param: {
|
||||
signalCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
|
||||
mouseCancelState(this.selected);
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
// 设置进路
|
||||
|
@ -8,6 +8,7 @@
|
||||
<stand-stop-time ref="standStopTime" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<stand-back-strategy ref="standBackStrategy" />
|
||||
<set-fault ref="setFault" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -28,6 +29,7 @@ import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { mouseCancelState } from './utils/menuItemStatus';
|
||||
import {menuOperate, commitOperate} from './utils/menuOperate';
|
||||
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
|
||||
|
||||
export default {
|
||||
name: 'StationStandMenu',
|
||||
@ -39,7 +41,8 @@ export default {
|
||||
StandRunLevel,
|
||||
NoticeInfo,
|
||||
StandBackStrategy,
|
||||
StandStopTime
|
||||
StandStopTime,
|
||||
SetFault
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
@ -197,48 +200,18 @@ export default {
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.StationStand.stoppage.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_ADD_FAULT,
|
||||
param: {
|
||||
standCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
|
||||
mouseCancelState(this.selected);
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.StationStand.cancelStoppage.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_REMOVE_FAULT,
|
||||
param: {
|
||||
standCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
|
||||
mouseCancelState(this.selected);
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
// 现地设置扣车
|
||||
|
@ -6,6 +6,7 @@
|
||||
<speed-limit-control ref="speedLimitControl" />
|
||||
<alxe-effective ref="alxeEffective" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<set-fault ref="setFault" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -22,8 +23,8 @@ import {DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { mouseCancelState } from './utils/menuItemStatus';
|
||||
import {menuOperate, commitOperate} from './utils/menuOperate';
|
||||
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
|
||||
|
||||
export default {
|
||||
name: 'SwitchMenu',
|
||||
@ -33,7 +34,8 @@ export default {
|
||||
SwitchControl,
|
||||
SpeedLimitControl,
|
||||
AlxeEffective,
|
||||
NoticeInfo
|
||||
NoticeInfo,
|
||||
SetFault
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
@ -89,16 +91,25 @@ export default {
|
||||
{
|
||||
label: '设置故障',
|
||||
handler: this.setStoppage,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_ADD_FAULT
|
||||
cmdType: CMD.Fault.CMD_SET_FAULT
|
||||
},
|
||||
{
|
||||
label: '取消故障',
|
||||
handler: this.cancelStoppage,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_REMOVE_FAULT
|
||||
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'operatemode'
|
||||
]),
|
||||
...mapGetters('menuOperation', [
|
||||
'buttonOperation'
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Switch) && !this.buttonOperation) {
|
||||
@ -113,15 +124,6 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'operatemode'
|
||||
]),
|
||||
...mapGetters('menuOperation', [
|
||||
'buttonOperation'
|
||||
])
|
||||
},
|
||||
methods: {
|
||||
clickEvent() {
|
||||
const self = this;
|
||||
@ -192,48 +194,18 @@ export default {
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Switch.stoppage.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_ADD_FAULT,
|
||||
param: {
|
||||
switchCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
|
||||
mouseCancelState(this.selected);
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Switch.cancelStoppage.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_REMOVE_FAULT,
|
||||
param: {
|
||||
switchCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
|
||||
mouseCancelState(this.selected);
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
// 道岔单锁
|
||||
|
@ -73,7 +73,7 @@
|
||||
</el-form>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="12" :offset="7">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确认</el-button>
|
||||
<el-button :id="domIdConfirm" type="primary" @click="commit">确认</el-button>
|
||||
<el-button :id="domIdCancel" @click="cancel">取消</el-button>
|
||||
<el-button>帮助</el-button>
|
||||
</el-col>
|
||||
|
@ -63,7 +63,7 @@
|
||||
</el-form>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="16" :offset="5">
|
||||
<el-button type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
<el-button type="primary" @click="commit">确定</el-button>
|
||||
<el-button @click="cancel">取消</el-button>
|
||||
<el-button>帮助</el-button>
|
||||
</el-col>
|
||||
|
@ -56,7 +56,7 @@
|
||||
</el-form>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="20" :offset="2">
|
||||
<el-button type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
<el-button type="primary" @click="commit">确定</el-button>
|
||||
<el-button @click="cancel">取消</el-button>
|
||||
<el-button>帮助</el-button>
|
||||
</el-col>
|
||||
|
@ -28,7 +28,7 @@
|
||||
</el-form>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="24">
|
||||
<el-button type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
<el-button type="primary" @click="commit">确定</el-button>
|
||||
<el-button @click="cancel">取消</el-button>
|
||||
<el-button>帮助</el-button>
|
||||
</el-col>
|
||||
|
@ -43,6 +43,8 @@ export default {
|
||||
return {
|
||||
unfold: true,
|
||||
tempData: [],
|
||||
commitDisabled: false,
|
||||
loading: false,
|
||||
tableStyle: {
|
||||
'border-bottom': 'none',
|
||||
'border-right': 'none'
|
||||
|
@ -5,6 +5,7 @@
|
||||
<section-control ref="sectionControl" />
|
||||
<section-cmd-control ref="sectionCmdControl" />
|
||||
<speed-limit-control ref="speedLimitControl" />
|
||||
<set-fault ref="setFault" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -19,6 +20,8 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
|
||||
import {menuOperate, commitOperate} from './utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'SectionMenu',
|
||||
@ -27,7 +30,8 @@ export default {
|
||||
NoticeInfo,
|
||||
SpeedLimitControl,
|
||||
SectionControl,
|
||||
SectionCmdControl
|
||||
SectionCmdControl,
|
||||
SetFault
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
@ -63,24 +67,14 @@ export default {
|
||||
},
|
||||
menuForce: [
|
||||
{
|
||||
label: '设置计轴失效',
|
||||
handler: this.alxeFailure,
|
||||
cmdType:''
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSection.setFault'),
|
||||
label: '设置故障',
|
||||
handler: this.setStoppage,
|
||||
cmdType: CMD.Section.CMD_SECTION_ADD_FAULT
|
||||
cmdType: CMD.Fault.CMD_SET_FAULT
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSection.cancelFault'),
|
||||
label: '取消故障',
|
||||
handler: this.cancelStoppage,
|
||||
cmdType: CMD.Section.CMD_SECTION_REMOVE_FAULT
|
||||
},
|
||||
{
|
||||
label: '创建速度限制',
|
||||
handler: this.setSpeed,
|
||||
cmdType: CMD.Section.CMD_SWITCH_SET_LIMIT_SPEED
|
||||
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
||||
}
|
||||
]
|
||||
};
|
||||
@ -152,49 +146,20 @@ export default {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
});
|
||||
},
|
||||
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
const step = {
|
||||
start: true,
|
||||
over:true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Section.stoppage.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_ADD_FAULT,
|
||||
param: {
|
||||
sectionCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
const step = {
|
||||
start: true,
|
||||
over:true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Section.cancelStoppage.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_REMOVE_FAULT,
|
||||
param: {
|
||||
sectionCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
});
|
||||
},
|
||||
// 设置速度
|
||||
|
@ -3,6 +3,7 @@
|
||||
<pop-menu ref="popMenu" :menu="menu" :pop-class="popClass" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<create-device-label ref="createDeviceLabel" />
|
||||
<set-fault ref="setFault" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -15,13 +16,16 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
|
||||
import {menuOperate, commitOperate} from './utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'SignalMenu',
|
||||
components: {
|
||||
PopMenu,
|
||||
NoticeInfo,
|
||||
CreateDeviceLabel
|
||||
CreateDeviceLabel,
|
||||
SetFault
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
@ -166,20 +170,15 @@ export default {
|
||||
]
|
||||
},
|
||||
menuForce: [
|
||||
{
|
||||
label: '信号关灯',
|
||||
handler: this.signalClose,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
|
||||
},
|
||||
{
|
||||
label: '设置故障',
|
||||
handler: this.setStoppage,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_ADD_FAULT
|
||||
cmdType: CMD.Fault.CMD_SET_FAULT
|
||||
},
|
||||
{
|
||||
label: '取消故障',
|
||||
handler: this.cancelStoppage,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_REMOVE_FAULT
|
||||
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
||||
}
|
||||
]
|
||||
};
|
||||
@ -259,48 +258,18 @@ export default {
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
const step = {
|
||||
start: true,
|
||||
over:true,
|
||||
code: `${this.selected.code}`,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_ADD_FAULT,
|
||||
operation: OperationEvent.Signal.stoppage.menu.operation,
|
||||
param: {
|
||||
signalCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
const step = {
|
||||
start: true,
|
||||
over:true,
|
||||
code: `${this.selected.code}`,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_REMOVE_FAULT,
|
||||
operation: OperationEvent.Signal.cancelStoppage.menu.operation,
|
||||
param: {
|
||||
signalCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
});
|
||||
},
|
||||
// 设置进路
|
||||
|
@ -3,6 +3,7 @@
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<platform-dwell ref="platformDwell" />
|
||||
<set-fault ref="setFault" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -15,13 +16,16 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
|
||||
import {menuOperate, commitOperate} from './utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'StationStandMenu',
|
||||
components: {
|
||||
PopMenu,
|
||||
NoticeInfo,
|
||||
PlatformDwell
|
||||
PlatformDwell,
|
||||
SetFault
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
@ -137,47 +141,18 @@ export default {
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
const step = {
|
||||
start: true,
|
||||
over:true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.StationStand.stoppage.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_ADD_FAULT,
|
||||
param: {
|
||||
standCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
const step = {
|
||||
start: true,
|
||||
over:true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.StationStand.cancelStoppage.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_REMOVE_FAULT,
|
||||
param: {
|
||||
standCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
});
|
||||
},
|
||||
// 设置跳停
|
||||
|
@ -4,6 +4,7 @@
|
||||
<notice-info ref="noticeInfo" />
|
||||
<switch-control ref="switchControl" />
|
||||
<create-device-label ref="createDeviceLabel" />
|
||||
<set-fault ref="setFault" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -18,6 +19,8 @@ import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
|
||||
import {menuOperate, commitOperate} from './utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'SwitchMenu',
|
||||
@ -25,7 +28,8 @@ export default {
|
||||
PopMenu,
|
||||
NoticeInfo,
|
||||
CreateDeviceLabel,
|
||||
SwitchControl
|
||||
SwitchControl,
|
||||
SetFault
|
||||
},
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
@ -118,12 +122,12 @@ export default {
|
||||
{
|
||||
label: '设置故障',
|
||||
handler: this.setStoppage,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_ADD_FAULT
|
||||
cmdType: CMD.Fault.CMD_SET_FAULT
|
||||
},
|
||||
{
|
||||
label: '取消故障',
|
||||
handler: this.cancelStoppage,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_REMOVE_FAULT
|
||||
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
||||
}
|
||||
]
|
||||
};
|
||||
@ -177,48 +181,18 @@ export default {
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
const operate = {
|
||||
start: true,
|
||||
over:true,
|
||||
operation: OperationEvent.Switch.stoppage.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_STOPPAGE,
|
||||
param: {
|
||||
switchCode: this.selected.code
|
||||
}
|
||||
};
|
||||
|
||||
// mouseCancelState(this.selected);
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
const operate = {
|
||||
start: true,
|
||||
over:true,
|
||||
operation: OperationEvent.Switch.cancelStoppage.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_CANCEL_STOPPAGE,
|
||||
param: {
|
||||
switchCode: this.selected.code
|
||||
}
|
||||
};
|
||||
|
||||
// mouseCancelState(this.selected);
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
// 道岔单锁
|
||||
|
257
src/jmapNew/theme/chengdu_01/menus/utils/menuOperate.js
Normal file
257
src/jmapNew/theme/chengdu_01/menus/utils/menuOperate.js
Normal file
@ -0,0 +1,257 @@
|
||||
import store from '@/store/index_APP_TARGET';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
// 操作
|
||||
export const menuOperate = {
|
||||
Section:{
|
||||
alxeFailure:{
|
||||
// 设置计轴失效
|
||||
operation: OperationEvent.Section.alxeFailure.menu.operation,
|
||||
// cmdType 值有问题
|
||||
cmdType: CMD.Section.CMD_SECTION_ADD_FAULT
|
||||
},
|
||||
active:{
|
||||
// 区段激活
|
||||
operation: OperationEvent.Section.active.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_ACTIVE
|
||||
},
|
||||
split:{
|
||||
// 区段切除
|
||||
operation: OperationEvent.Section.split.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_CUT_OFF
|
||||
},
|
||||
setSpeed:{
|
||||
// 设置速度
|
||||
operation: OperationEvent.Section.setSpeed.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
|
||||
},
|
||||
fault:{
|
||||
// 区段故障解锁
|
||||
operation: OperationEvent.Section.fault.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK
|
||||
}
|
||||
},
|
||||
Signal:{
|
||||
arrangementRoute:{
|
||||
// 排列进路
|
||||
operation: OperationEvent.Signal.arrangementRoute.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
|
||||
},
|
||||
cancelTrainRoute:{
|
||||
// 取消进路
|
||||
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
|
||||
},
|
||||
lock:{
|
||||
// 信号封锁
|
||||
operation:OperationEvent.Signal.lock.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_BLOCK
|
||||
},
|
||||
unlock:{
|
||||
// 信号解封
|
||||
operation: OperationEvent.Signal.unlock.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK
|
||||
},
|
||||
guide:{
|
||||
// 进路引导
|
||||
operation: OperationEvent.Signal.guide.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
|
||||
},
|
||||
reopenSignal:{
|
||||
// 信号重开
|
||||
operation: OperationEvent.Signal.reopenSignal.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
|
||||
},
|
||||
signalClose:{
|
||||
// 信号关灯
|
||||
operation: OperationEvent.Signal.signalClose.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
|
||||
},
|
||||
humanControl:{
|
||||
// 进路交人工控
|
||||
operation: OperationEvent.Signal.humanControl.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING
|
||||
},
|
||||
atsAutoControl:{
|
||||
// 进路交自动控
|
||||
operation: OperationEvent.Signal.atsAutoControl.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
|
||||
},
|
||||
setAutoInterlock:{
|
||||
// 设置通过模式
|
||||
operation: OperationEvent.Signal.setAutoInterlock.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
|
||||
},
|
||||
cancelAutoInterlock:{
|
||||
// 取消通过模式
|
||||
operation: OperationEvent.Signal.cancelAutoInterlock.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
|
||||
},
|
||||
detail:{
|
||||
// 查询进路状态
|
||||
operation: OperationEvent.Signal.detail.menu.operation
|
||||
},
|
||||
cancelGuide:{
|
||||
// 人工解锁进路(信号机取消引导)
|
||||
operation: OperationEvent.Signal.cancelGuide.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_GUIDE
|
||||
},
|
||||
setAutoTurnBack:{
|
||||
// 设置自动折返
|
||||
operation: OperationEvent.AutoTurnBack.SetAutoTurnBackButton.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_AUTO_TURN_BACK
|
||||
},
|
||||
cancelAutoTurnBack:{
|
||||
// 取消自动折返
|
||||
operation: OperationEvent.AutoTurnBack.CancelAutoTurnBackButton.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_AUTO_TURN_BACK
|
||||
}
|
||||
},
|
||||
Switch:{
|
||||
lock:{
|
||||
// 道岔单锁
|
||||
operation: OperationEvent.Switch.lock.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK
|
||||
},
|
||||
unlock:{
|
||||
// 道岔解锁
|
||||
operation: OperationEvent.Switch.unlock.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
|
||||
},
|
||||
block:{
|
||||
// 道岔封锁
|
||||
operation: OperationEvent.Switch.block.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_BLOCK
|
||||
},
|
||||
unblock:{
|
||||
// 道岔解封
|
||||
operation: OperationEvent.Switch.unblock.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_UNBLOCK
|
||||
},
|
||||
locate:{
|
||||
// 单操到定位
|
||||
operation: OperationEvent.Switch.locate.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION
|
||||
},
|
||||
reverse:{
|
||||
// 单操到反位
|
||||
operation: OperationEvent.Switch.reverse.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION
|
||||
},
|
||||
setSpeed:{
|
||||
// 设置临时限速
|
||||
operation: OperationEvent.Switch.setSpeed.menu.operation,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED
|
||||
},
|
||||
turnoutForce: {
|
||||
// 道岔强制扳动
|
||||
operation: OperationEvent.Switch.turnoutForce.menu.operation,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_FORCE_TURN
|
||||
}
|
||||
},
|
||||
StationStand:{
|
||||
setDetainTrain:{
|
||||
// 设置扣车
|
||||
operation: OperationEvent.StationStand.setDetainTrain.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_HOLD_TRAIN
|
||||
},
|
||||
cancelDetainTrain:{
|
||||
// 取消扣车
|
||||
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN
|
||||
},
|
||||
cancelDetainTrainAll:{
|
||||
// 全线取消扣车
|
||||
operation: OperationEvent.StationStand.cancelDetainTrainAll.menu.operation,
|
||||
cmdType:CMD.Stand.CMD_STAND_WHOLE_LINE_CANCEL_HOLD_TRAIN
|
||||
},
|
||||
setJumpStop:{
|
||||
// 设置跳停
|
||||
operation: OperationEvent.StationStand.setJumpStop.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_JUMP_STOP
|
||||
},
|
||||
cancelJumpStop:{
|
||||
// 取消跳停
|
||||
operation: OperationEvent.StationStand.cancelJumpStop.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP
|
||||
},
|
||||
setStopTime:{
|
||||
// 停站时间控制
|
||||
operation: OperationEvent.StationStand.setStopTime.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_PARK_TIME
|
||||
},
|
||||
setRunLevel:{
|
||||
// 运行时间控制
|
||||
operation: OperationEvent.StationStand.setRunLevel.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_RUN_TIME
|
||||
},
|
||||
earlyDeparture:{
|
||||
// 设置提前发车
|
||||
operation: OperationEvent.StationStand.earlyDeparture.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_EARLY_DEPART
|
||||
},
|
||||
detail:{
|
||||
// 查询站台状态
|
||||
operation: OperationEvent.StationStand.detail.menu.operation
|
||||
}
|
||||
},
|
||||
StationControl:{
|
||||
// requestCentralControl:{
|
||||
// // 请求中控(遥控)
|
||||
// operation: OperationEvent.StationControl.requestCentralControl.menu.operation,
|
||||
// cmdType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_CENTER_CONTROL
|
||||
// },
|
||||
// requestStationControl:{
|
||||
// // 请求站控
|
||||
// operation: OperationEvent.StationControl.requestStationControl.menu.operation,
|
||||
// cmdType:CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL
|
||||
// },
|
||||
// emergencyStationControl:{
|
||||
// // 紧急站控
|
||||
// operation: OperationEvent.StationControl.emergencyStationControl.menu.operation,
|
||||
// cmdType:CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL
|
||||
// }
|
||||
},
|
||||
Common: {
|
||||
setFault: {
|
||||
operation: OperationEvent.Section.stoppage.menu.operation,
|
||||
cmdType: CMD.Fault.CMD_SET_FAULT
|
||||
},
|
||||
cancelFault: {
|
||||
operation: OperationEvent.Section.cancelStoppage.menu.operation,
|
||||
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export function commitOperate(operate, paramList, over) {
|
||||
const step = {
|
||||
start: true,
|
||||
operation: operate.operation,
|
||||
param:{}
|
||||
};
|
||||
step.param = paramList;
|
||||
// over 0为首次操作,1为中间操作,2为最后操作,3为直接一次性操作
|
||||
if (over == 0 || over == 3) {
|
||||
const codeList = Object.values(paramList);
|
||||
step.code = codeList[0];
|
||||
}
|
||||
if (over != 0 && over != 3) {
|
||||
delete step.start;
|
||||
}
|
||||
if (over == 2 || over == 3) {
|
||||
step.over = true;
|
||||
step.cmdType = operate.cmdType;
|
||||
}
|
||||
return new Promise(function(resolve, reject) {
|
||||
store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
resolve({ valid: valid, operate: step });
|
||||
}).catch(error=>{
|
||||
reject(error);
|
||||
});
|
||||
});
|
||||
}
|
@ -5,6 +5,7 @@
|
||||
<train-create ref="trainCreate" />
|
||||
<section-detail ref="sectionDetail" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<set-fault ref="setFault" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -19,6 +20,8 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
|
||||
import {menuOperate, commitOperate} from './utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'SectionMenu',
|
||||
@ -27,7 +30,8 @@ export default {
|
||||
SectionControl,
|
||||
SectionDetail,
|
||||
TrainCreate,
|
||||
NoticeInfo
|
||||
NoticeInfo,
|
||||
SetFault
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
@ -43,10 +47,10 @@ export default {
|
||||
menuNormal: {
|
||||
Local: [
|
||||
{
|
||||
label: '区故解',
|
||||
handler: this.fault,
|
||||
label: '区故解',
|
||||
handler: this.fault,
|
||||
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK,
|
||||
auth: { station: true, center: false }
|
||||
auth: { station: true, center: false }
|
||||
}
|
||||
],
|
||||
Center: [
|
||||
@ -66,19 +70,14 @@ export default {
|
||||
},
|
||||
menuForce: [
|
||||
{
|
||||
label: '设置计轴失效',
|
||||
handler: this.alxeFailure,
|
||||
cmdType:''
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSection.setFault'),
|
||||
label: '设置故障',
|
||||
handler: this.setStoppage,
|
||||
cmdType: CMD.Section.CMD_SECTION_ADD_FAULT
|
||||
cmdType: CMD.Fault.CMD_SET_FAULT
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSection.cancelFault'),
|
||||
label: '取消故障',
|
||||
handler: this.cancelStoppage,
|
||||
cmdType: CMD.Section.CMD_SECTION_REMOVE_FAULT
|
||||
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
||||
}
|
||||
]
|
||||
};
|
||||
@ -186,44 +185,18 @@ export default {
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Section.stoppage.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_ADD_FAULT,
|
||||
param: {
|
||||
sectionCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Section.cancelStoppage.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_REMOVE_FAULT,
|
||||
param: {
|
||||
sectionCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
});
|
||||
},
|
||||
undeveloped() {
|
||||
|
@ -8,6 +8,7 @@
|
||||
<route-hand-control ref="routeHandControl" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<password-box ref="passwordBox" @checkOver="passWordCommit" />
|
||||
<set-fault ref="setFault" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -25,6 +26,8 @@ import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import PasswordBox from './dialog/childDialog/passwordInputBox';
|
||||
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
|
||||
import {menuOperate, commitOperate} from './utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'SignalMenu',
|
||||
@ -36,7 +39,8 @@ export default {
|
||||
RouteDetail,
|
||||
RouteGuide,
|
||||
NoticeInfo,
|
||||
PasswordBox
|
||||
PasswordBox,
|
||||
SetFault
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
@ -141,20 +145,15 @@ export default {
|
||||
]
|
||||
},
|
||||
menuForce: [
|
||||
{
|
||||
label: '信号关灯',
|
||||
handler: this.signalClose,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
|
||||
},
|
||||
{
|
||||
label: '设置故障',
|
||||
handler: this.setStoppage,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_ADD_FAULT
|
||||
cmdType: CMD.Fault.CMD_SET_FAULT
|
||||
},
|
||||
{
|
||||
label: '取消故障',
|
||||
handler: this.cancelStoppage,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_REMOVE_FAULT
|
||||
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
||||
}
|
||||
]
|
||||
};
|
||||
@ -232,46 +231,18 @@ export default {
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_ADD_FAULT,
|
||||
operation: OperationEvent.Signal.stoppage.menu.operation,
|
||||
param: {
|
||||
signalCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_REMOVE_FAULT,
|
||||
operation: OperationEvent.Signal.cancelStoppage.menu.operation,
|
||||
param: {
|
||||
signalCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
});
|
||||
},
|
||||
// 设置进路
|
||||
|
@ -4,6 +4,7 @@
|
||||
<stand-control ref="standControl" />
|
||||
<stand-detail ref="standDetail" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<set-fault ref="setFault" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -17,6 +18,8 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
|
||||
import {menuOperate, commitOperate} from './utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'StationStandMenu',
|
||||
@ -24,7 +27,8 @@ export default {
|
||||
PopMenu,
|
||||
StandControl,
|
||||
StandDetail,
|
||||
NoticeInfo
|
||||
NoticeInfo,
|
||||
SetFault
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
@ -151,45 +155,18 @@ export default {
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.StationStand.stoppage.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_ADD_FAULT,
|
||||
param: {
|
||||
standCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.$refs.noticeInfo.doShow(step, [error.message]);
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.StationStand.cancelStoppage.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_REMOVE_FAULT,
|
||||
param: {
|
||||
standCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.$refs.noticeInfo.doShow(step, [error.message]);
|
||||
});
|
||||
},
|
||||
// 设置扣车
|
||||
|
@ -4,6 +4,7 @@
|
||||
<section-control ref="sectionControl" />
|
||||
<switch-control ref="switchControl" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<set-fault ref="setFault" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -18,6 +19,8 @@ import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import {menuOperate, commitOperate} from './utils/menuOperate';
|
||||
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
|
||||
|
||||
export default {
|
||||
name: 'SwitchMenu',
|
||||
@ -25,7 +28,8 @@ export default {
|
||||
PopMenu,
|
||||
SectionControl,
|
||||
SwitchControl,
|
||||
NoticeInfo
|
||||
NoticeInfo,
|
||||
SetFault
|
||||
},
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
@ -91,12 +95,12 @@ export default {
|
||||
{
|
||||
label: '设置故障',
|
||||
handler: this.setStoppage,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_ADD_FAULT
|
||||
cmdType: CMD.Fault.CMD_SET_FAULT
|
||||
},
|
||||
{
|
||||
label: '取消故障',
|
||||
handler: this.cancelStoppage,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_REMOVE_FAULT
|
||||
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
||||
}
|
||||
]
|
||||
};
|
||||
@ -150,46 +154,18 @@ export default {
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
const operate = {
|
||||
start: true,
|
||||
operation: OperationEvent.Switch.stoppage.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_STOPPAGE,
|
||||
param: {
|
||||
switchCode: this.selected.code
|
||||
}
|
||||
};
|
||||
|
||||
// mouseCancelState(this.selected);
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
const operate = {
|
||||
start: true,
|
||||
operation: OperationEvent.Switch.cancelStoppage.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_CANCEL_STOPPAGE,
|
||||
param: {
|
||||
switchCode: this.selected.code
|
||||
}
|
||||
};
|
||||
|
||||
// mouseCancelState(this.selected);
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
// 道岔单锁
|
||||
|
257
src/jmapNew/theme/chengdu_03/menus/utils/menuOperate.js
Normal file
257
src/jmapNew/theme/chengdu_03/menus/utils/menuOperate.js
Normal file
@ -0,0 +1,257 @@
|
||||
import store from '@/store/index_APP_TARGET';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
// 操作
|
||||
export const menuOperate = {
|
||||
Section:{
|
||||
alxeFailure:{
|
||||
// 设置计轴失效
|
||||
operation: OperationEvent.Section.alxeFailure.menu.operation,
|
||||
// cmdType 值有问题
|
||||
cmdType: CMD.Section.CMD_SECTION_ADD_FAULT
|
||||
},
|
||||
active:{
|
||||
// 区段激活
|
||||
operation: OperationEvent.Section.active.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_ACTIVE
|
||||
},
|
||||
split:{
|
||||
// 区段切除
|
||||
operation: OperationEvent.Section.split.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_CUT_OFF
|
||||
},
|
||||
setSpeed:{
|
||||
// 设置速度
|
||||
operation: OperationEvent.Section.setSpeed.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
|
||||
},
|
||||
fault:{
|
||||
// 区段故障解锁
|
||||
operation: OperationEvent.Section.fault.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK
|
||||
}
|
||||
},
|
||||
Signal:{
|
||||
arrangementRoute:{
|
||||
// 排列进路
|
||||
operation: OperationEvent.Signal.arrangementRoute.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
|
||||
},
|
||||
cancelTrainRoute:{
|
||||
// 取消进路
|
||||
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
|
||||
},
|
||||
lock:{
|
||||
// 信号封锁
|
||||
operation:OperationEvent.Signal.lock.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_BLOCK
|
||||
},
|
||||
unlock:{
|
||||
// 信号解封
|
||||
operation: OperationEvent.Signal.unlock.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK
|
||||
},
|
||||
guide:{
|
||||
// 进路引导
|
||||
operation: OperationEvent.Signal.guide.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
|
||||
},
|
||||
reopenSignal:{
|
||||
// 信号重开
|
||||
operation: OperationEvent.Signal.reopenSignal.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
|
||||
},
|
||||
signalClose:{
|
||||
// 信号关灯
|
||||
operation: OperationEvent.Signal.signalClose.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
|
||||
},
|
||||
humanControl:{
|
||||
// 进路交人工控
|
||||
operation: OperationEvent.Signal.humanControl.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING
|
||||
},
|
||||
atsAutoControl:{
|
||||
// 进路交自动控
|
||||
operation: OperationEvent.Signal.atsAutoControl.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
|
||||
},
|
||||
setAutoInterlock:{
|
||||
// 设置通过模式
|
||||
operation: OperationEvent.Signal.setAutoInterlock.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
|
||||
},
|
||||
cancelAutoInterlock:{
|
||||
// 取消通过模式
|
||||
operation: OperationEvent.Signal.cancelAutoInterlock.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
|
||||
},
|
||||
detail:{
|
||||
// 查询进路状态
|
||||
operation: OperationEvent.Signal.detail.menu.operation
|
||||
},
|
||||
cancelGuide:{
|
||||
// 人工解锁进路(信号机取消引导)
|
||||
operation: OperationEvent.Signal.cancelGuide.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_GUIDE
|
||||
},
|
||||
setAutoTurnBack:{
|
||||
// 设置自动折返
|
||||
operation: OperationEvent.AutoTurnBack.SetAutoTurnBackButton.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_AUTO_TURN_BACK
|
||||
},
|
||||
cancelAutoTurnBack:{
|
||||
// 取消自动折返
|
||||
operation: OperationEvent.AutoTurnBack.CancelAutoTurnBackButton.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_AUTO_TURN_BACK
|
||||
}
|
||||
},
|
||||
Switch:{
|
||||
lock:{
|
||||
// 道岔单锁
|
||||
operation: OperationEvent.Switch.lock.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK
|
||||
},
|
||||
unlock:{
|
||||
// 道岔解锁
|
||||
operation: OperationEvent.Switch.unlock.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
|
||||
},
|
||||
block:{
|
||||
// 道岔封锁
|
||||
operation: OperationEvent.Switch.block.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_BLOCK
|
||||
},
|
||||
unblock:{
|
||||
// 道岔解封
|
||||
operation: OperationEvent.Switch.unblock.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_UNBLOCK
|
||||
},
|
||||
locate:{
|
||||
// 单操到定位
|
||||
operation: OperationEvent.Switch.locate.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION
|
||||
},
|
||||
reverse:{
|
||||
// 单操到反位
|
||||
operation: OperationEvent.Switch.reverse.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION
|
||||
},
|
||||
setSpeed:{
|
||||
// 设置临时限速
|
||||
operation: OperationEvent.Switch.setSpeed.menu.operation,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED
|
||||
},
|
||||
turnoutForce: {
|
||||
// 道岔强制扳动
|
||||
operation: OperationEvent.Switch.turnoutForce.menu.operation,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_FORCE_TURN
|
||||
}
|
||||
},
|
||||
StationStand:{
|
||||
setDetainTrain:{
|
||||
// 设置扣车
|
||||
operation: OperationEvent.StationStand.setDetainTrain.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_HOLD_TRAIN
|
||||
},
|
||||
cancelDetainTrain:{
|
||||
// 取消扣车
|
||||
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN
|
||||
},
|
||||
cancelDetainTrainAll:{
|
||||
// 全线取消扣车
|
||||
operation: OperationEvent.StationStand.cancelDetainTrainAll.menu.operation,
|
||||
cmdType:CMD.Stand.CMD_STAND_WHOLE_LINE_CANCEL_HOLD_TRAIN
|
||||
},
|
||||
setJumpStop:{
|
||||
// 设置跳停
|
||||
operation: OperationEvent.StationStand.setJumpStop.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_JUMP_STOP
|
||||
},
|
||||
cancelJumpStop:{
|
||||
// 取消跳停
|
||||
operation: OperationEvent.StationStand.cancelJumpStop.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP
|
||||
},
|
||||
setStopTime:{
|
||||
// 停站时间控制
|
||||
operation: OperationEvent.StationStand.setStopTime.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_PARK_TIME
|
||||
},
|
||||
setRunLevel:{
|
||||
// 运行时间控制
|
||||
operation: OperationEvent.StationStand.setRunLevel.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_RUN_TIME
|
||||
},
|
||||
earlyDeparture:{
|
||||
// 设置提前发车
|
||||
operation: OperationEvent.StationStand.earlyDeparture.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_EARLY_DEPART
|
||||
},
|
||||
detail:{
|
||||
// 查询站台状态
|
||||
operation: OperationEvent.StationStand.detail.menu.operation
|
||||
}
|
||||
},
|
||||
StationControl:{
|
||||
// requestCentralControl:{
|
||||
// // 请求中控(遥控)
|
||||
// operation: OperationEvent.StationControl.requestCentralControl.menu.operation,
|
||||
// cmdType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_CENTER_CONTROL
|
||||
// },
|
||||
// requestStationControl:{
|
||||
// // 请求站控
|
||||
// operation: OperationEvent.StationControl.requestStationControl.menu.operation,
|
||||
// cmdType:CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL
|
||||
// },
|
||||
// emergencyStationControl:{
|
||||
// // 紧急站控
|
||||
// operation: OperationEvent.StationControl.emergencyStationControl.menu.operation,
|
||||
// cmdType:CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL
|
||||
// }
|
||||
},
|
||||
Common: {
|
||||
setFault: {
|
||||
operation: OperationEvent.Section.stoppage.menu.operation,
|
||||
cmdType: CMD.Fault.CMD_SET_FAULT
|
||||
},
|
||||
cancelFault: {
|
||||
operation: OperationEvent.Section.cancelStoppage.menu.operation,
|
||||
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export function commitOperate(operate, paramList, over) {
|
||||
const step = {
|
||||
start: true,
|
||||
operation: operate.operation,
|
||||
param:{}
|
||||
};
|
||||
step.param = paramList;
|
||||
// over 0为首次操作,1为中间操作,2为最后操作,3为直接一次性操作
|
||||
if (over == 0 || over == 3) {
|
||||
const codeList = Object.values(paramList);
|
||||
step.code = codeList[0];
|
||||
}
|
||||
if (over != 0 && over != 3) {
|
||||
delete step.start;
|
||||
}
|
||||
if (over == 2 || over == 3) {
|
||||
step.over = true;
|
||||
step.cmdType = operate.cmdType;
|
||||
}
|
||||
return new Promise(function(resolve, reject) {
|
||||
store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
resolve({ valid: valid, operate: step });
|
||||
}).catch(error=>{
|
||||
reject(error);
|
||||
});
|
||||
});
|
||||
}
|
@ -5,6 +5,7 @@
|
||||
<section-un-lock ref="sectionUnLock" />
|
||||
<speed-limit-control ref="speedLimitControl" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<set-fault ref="setFault" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -19,6 +20,7 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import {menuOperate, commitOperate} from './utils/menuOperate';
|
||||
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
|
||||
|
||||
export default {
|
||||
name: 'SectionMenu',
|
||||
@ -27,7 +29,8 @@ export default {
|
||||
SectionControl,
|
||||
SectionUnLock,
|
||||
SpeedLimitControl,
|
||||
NoticeInfo
|
||||
NoticeInfo,
|
||||
SetFault
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
@ -78,9 +81,14 @@ export default {
|
||||
},
|
||||
menuForce: [
|
||||
{
|
||||
label: '设置计轴失效', // 设置区段故障
|
||||
handler: this.alxeFailure,
|
||||
cmdType: CMD.Section.CMD_SECTION_ADD_FAULT
|
||||
label: '设置故障',
|
||||
handler: this.setStoppage,
|
||||
cmdType: CMD.Fault.CMD_SET_FAULT
|
||||
},
|
||||
{
|
||||
label: '取消故障',
|
||||
handler: this.cancelStoppage,
|
||||
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
||||
}
|
||||
]
|
||||
};
|
||||
@ -130,11 +138,20 @@ export default {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
// 设置计轴失效
|
||||
alxeFailure() {
|
||||
commitOperate(menuOperate.Section.alxeFailure, {sectionCode:this.selected.code}, 3).then(({valid, operate})=>{
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 故障解锁
|
||||
|
@ -9,6 +9,7 @@
|
||||
<route-detail ref="routeDetail" />
|
||||
<router-command ref="routerCommand" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<set-fault ref="setFault" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -22,6 +23,7 @@ import RouteHandControl from './dialog/routeHandControl';
|
||||
import RouterCommand from './dialog/routerCommand';
|
||||
import RouteDetail from './dialog/routeDetail';
|
||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
|
||||
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
@ -41,7 +43,8 @@ export default {
|
||||
RouteHandControl,
|
||||
RouteDetail,
|
||||
RouterCommand,
|
||||
NoticeInfo
|
||||
NoticeInfo,
|
||||
SetFault
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
@ -144,20 +147,15 @@ export default {
|
||||
]
|
||||
},
|
||||
menuForce: [
|
||||
{
|
||||
label: '信号关灯',
|
||||
handler: this.signalClose,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
|
||||
},
|
||||
{
|
||||
label: '设置故障',
|
||||
handler: this.setStoppage,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_ADD_FAULT
|
||||
cmdType: CMD.Fault.CMD_SET_FAULT
|
||||
},
|
||||
{
|
||||
label: '取消故障',
|
||||
handler: this.cancelStoppage,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_REMOVE_FAULT
|
||||
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
||||
}
|
||||
]
|
||||
};
|
||||
@ -220,46 +218,18 @@ export default {
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Signal.stoppage.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_ADD_FAULT,
|
||||
param: {
|
||||
signalCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.mouseCancelState(this.selected);
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Signal.cancelStoppage.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_REMOVE_FAULT,
|
||||
param: {
|
||||
signalCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.mouseCancelState(this.selected);
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
});
|
||||
},
|
||||
operationHandler(buttonOperation, selectType) {
|
||||
|
@ -9,6 +9,7 @@
|
||||
<stand-back-strategy ref="standBackStrategy" />
|
||||
<stand-detain-train-all ref="standDetainTrainAll" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<set-fault ref="setFault" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -28,6 +29,7 @@ import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import {menuOperate, commitOperate} from './utils/menuOperate';
|
||||
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
|
||||
|
||||
export default {
|
||||
name: 'StationStandMenu',
|
||||
@ -40,7 +42,8 @@ export default {
|
||||
NoticeInfo,
|
||||
StandBackStrategy,
|
||||
StandStopTime,
|
||||
StandDetainTrainAll
|
||||
StandDetainTrainAll,
|
||||
SetFault
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
@ -194,44 +197,18 @@ export default {
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.StationStand.stoppage.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_ADD_FAULT,
|
||||
param: {
|
||||
standCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
const step = {
|
||||
over: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.StationStand.cancelStoppage.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_REMOVE_FAULT,
|
||||
param: {
|
||||
standCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
});
|
||||
},
|
||||
// 设置扣车
|
||||
|
@ -5,6 +5,7 @@
|
||||
<switch-un-lock ref="switchUnLock" />
|
||||
<speed-limit-control ref="speedLimitControl" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<set-fault ref="setFault" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -20,6 +21,7 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
|
||||
|
||||
export default {
|
||||
name: 'SwitchMenu',
|
||||
@ -28,7 +30,8 @@ export default {
|
||||
SwitchControl,
|
||||
SwitchUnLock,
|
||||
SpeedLimitControl,
|
||||
NoticeInfo
|
||||
NoticeInfo,
|
||||
SetFault
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
@ -81,12 +84,12 @@ export default {
|
||||
{
|
||||
label: '设置故障',
|
||||
handler: this.setStoppage,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_ADD_FAULT
|
||||
cmdType: CMD.Fault.CMD_SET_FAULT
|
||||
},
|
||||
{
|
||||
label: '取消故障',
|
||||
handler: this.cancelStoppage,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_REMOVE_FAULT
|
||||
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
||||
}
|
||||
]
|
||||
};
|
||||
@ -143,46 +146,18 @@ export default {
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Switch.stoppage.menu.operation,
|
||||
param: {
|
||||
switchCode: this.selected.code
|
||||
}
|
||||
};
|
||||
|
||||
this.mouseCancelState(this.selected);
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Switch.cancelStoppage.menu.operation,
|
||||
param: {
|
||||
switchCode: this.selected.code
|
||||
}
|
||||
};
|
||||
|
||||
this.mouseCancelState(this.selected);
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
operationHandler(buttonOperation, selectType) {
|
||||
|
@ -212,6 +212,16 @@ export const menuOperate = {
|
||||
// operation: OperationEvent.StationControl.emergencyStationControl.menu.operation,
|
||||
// cmdType:CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL
|
||||
// }
|
||||
},
|
||||
Common: {
|
||||
setFault: {
|
||||
operation: OperationEvent.Section.stoppage.menu.operation,
|
||||
cmdType: CMD.Fault.CMD_SET_FAULT
|
||||
},
|
||||
cancelFault: {
|
||||
operation: OperationEvent.Section.cancelStoppage.menu.operation,
|
||||
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -5,6 +5,7 @@
|
||||
<section-cmd-control ref="sectionCmdControl" />
|
||||
<speed-cmd-control ref="speedCmdControl" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<set-fault ref="setFault" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -20,6 +21,8 @@ import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
|
||||
import {menuOperate, commitOperate} from './utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'SectionMenu',
|
||||
@ -28,7 +31,8 @@ export default {
|
||||
SectionControl,
|
||||
SectionCmdControl,
|
||||
SpeedCmdControl,
|
||||
NoticeInfo
|
||||
NoticeInfo,
|
||||
SetFault
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
@ -127,12 +131,12 @@ export default {
|
||||
{
|
||||
label: this.$t('menu.menuSection.setFault'),
|
||||
handler: this.setStoppage,
|
||||
cmdType: CMD.Section.CMD_SECTION_ADD_FAULT
|
||||
cmdType: CMD.Fault.CMD_SET_FAULT
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSection.cancelFault'),
|
||||
handler: this.cancelStoppage,
|
||||
cmdType: CMD.Section.CMD_SECTION_REMOVE_FAULT
|
||||
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
||||
}
|
||||
]
|
||||
};
|
||||
@ -185,45 +189,18 @@ export default {
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Section.stoppage.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_ADD_FAULT,
|
||||
param: {
|
||||
Section_Code: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Section.cancelStoppage.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_REMOVE_FAULT,
|
||||
param: {
|
||||
Section_Code: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
});
|
||||
},
|
||||
// 故障解锁
|
||||
|
@ -8,6 +8,7 @@
|
||||
<route-hand-control ref="routeHandControl" />
|
||||
<route-detail ref="routeDetail" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<set-fault ref="setFault" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -26,6 +27,8 @@ import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import { querySignalStatus } from '@/api/simulation';
|
||||
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
|
||||
import {menuOperate, commitOperate} from './utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'SignalMenu',
|
||||
@ -37,7 +40,8 @@ export default {
|
||||
RouteCmdControl,
|
||||
RouteHandControl,
|
||||
RouteDetail,
|
||||
NoticeInfo
|
||||
NoticeInfo,
|
||||
SetFault
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
@ -155,12 +159,12 @@ export default {
|
||||
{
|
||||
label: this.$t('menu.menuSignal.setFault'),
|
||||
handler: this.setStoppage,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_ADD_FAULT
|
||||
cmdType: CMD.Fault.CMD_SET_FAULT
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSignal.cancelFault'),
|
||||
handler: this.cancelStoppage,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_REMOVE_FAULT
|
||||
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
||||
}
|
||||
]
|
||||
};
|
||||
@ -214,44 +218,18 @@ export default {
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Signal.stoppage.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_ADD_FAULT,
|
||||
param: {
|
||||
Signal_Code: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Signal.cancelStoppage.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_REMOVE_FAULT,
|
||||
param: {
|
||||
Signal_Code: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
});
|
||||
},
|
||||
// 排列进路
|
||||
|
@ -89,12 +89,12 @@ export default {
|
||||
{
|
||||
label: this.$t('menu.menuStation.setStoppage'),
|
||||
handler: this.setStoppage,
|
||||
cmdType: CMD.Station.CMD_STATION_ADD_FAULT
|
||||
cmdType: CMD.Fault.CMD_SET_FAULT
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuStation.cancelStoppage'),
|
||||
handler: this.cancelStoppage,
|
||||
cmdType: CMD.Station.CMD_STATION_REMOVE_FAULT
|
||||
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
||||
}
|
||||
]
|
||||
};
|
||||
|
@ -8,6 +8,7 @@
|
||||
<stand-detain-train-all ref="standDetainTrainAll" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<stand-back-strategy ref="standBackStrategy" />
|
||||
<set-fault ref="setFault" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -26,6 +27,8 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
|
||||
import {menuOperate, commitOperate} from './utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'StationStandMenu',
|
||||
@ -37,7 +40,8 @@ export default {
|
||||
NoticeInfo,
|
||||
StandBackStrategy,
|
||||
StandStopTime,
|
||||
StandDetainTrainAll
|
||||
StandDetainTrainAll,
|
||||
SetFault
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
@ -219,44 +223,18 @@ export default {
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.StationStand.stoppage.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_ADD_FAULT,
|
||||
param: {
|
||||
StationStand_Code: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.StationStand.cancelStoppage.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_REMOVE_FAULT,
|
||||
param: {
|
||||
StationStand_Code: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
});
|
||||
},
|
||||
// 设置扣车
|
||||
|
@ -5,6 +5,7 @@
|
||||
<switch-cmd-control ref="switchCmdControl" />
|
||||
<speed-cmd-control ref="speedCmdControl" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<set-fault ref="setFault" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -19,6 +20,8 @@ import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
|
||||
import {menuOperate, commitOperate} from './utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'SwitchMenu',
|
||||
@ -27,7 +30,8 @@ export default {
|
||||
SwitchControl,
|
||||
SwitchCmdControl,
|
||||
SpeedCmdControl,
|
||||
NoticeInfo
|
||||
NoticeInfo,
|
||||
SetFault
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
@ -174,18 +178,12 @@ export default {
|
||||
{
|
||||
label: this.$t('menu.menuSwitch.setFault'),
|
||||
handler: this.setStoppage,
|
||||
auth: {
|
||||
|
||||
},
|
||||
cmdType:CMD.Switch.CMD_SWITCH_ADD_FAULT
|
||||
cmdType:CMD.Fault.CMD_SET_FAULT
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSwitch.cancelFault'),
|
||||
handler: this.cancelStoppage,
|
||||
auth: {
|
||||
|
||||
},
|
||||
cmdType:CMD.Switch.CMD_SWITCH_REMOVE_FAULT
|
||||
cmdType:CMD.Fault.CMD_CANCEL_FAULT
|
||||
}
|
||||
]
|
||||
};
|
||||
@ -244,42 +242,18 @@ export default {
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
const step = {
|
||||
start: true,
|
||||
operation: OperationEvent.Switch.stoppage.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_STOPPAGE,
|
||||
param: {
|
||||
Switch_Code: this.selected.code
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
const step = {
|
||||
start: true,
|
||||
operation: OperationEvent.Switch.cancelStoppage.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_CANCEL_STOPPAGE,
|
||||
param: {
|
||||
Switch_Code: this.selected.code
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
});
|
||||
},
|
||||
// 道岔单锁
|
||||
|
308
src/jmapNew/theme/fuzhou_01/menus/utils/menuOperate.js
Normal file
308
src/jmapNew/theme/fuzhou_01/menus/utils/menuOperate.js
Normal file
@ -0,0 +1,308 @@
|
||||
import store from '@/store/index_APP_TARGET';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
// 操作
|
||||
export const menuOperate = {
|
||||
Section:{
|
||||
alxeFailure:{
|
||||
// 设置计轴失效
|
||||
operation: OperationEvent.Section.alxeFailure.menu.operation,
|
||||
// cmdType 值有问题
|
||||
cmdType: CMD.Section.CMD_SECTION_ADD_FAULT
|
||||
},
|
||||
active:{
|
||||
// 区段激活
|
||||
operation: OperationEvent.Section.active.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_ACTIVE
|
||||
},
|
||||
alxeEffective:{
|
||||
// 确认计轴有效
|
||||
operation: OperationEvent.Section.alxeEffective.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_COMFIRMATION_AXLE
|
||||
},
|
||||
split:{
|
||||
// 区段切除
|
||||
operation: OperationEvent.Section.split.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_CUT_OFF
|
||||
},
|
||||
lock:{
|
||||
// 区段封锁
|
||||
operation: OperationEvent.Section.lock.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_BLOCK
|
||||
},
|
||||
unlock:{
|
||||
// 区段解锁
|
||||
operation: OperationEvent.Section.unlock.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_UNBLOCK
|
||||
},
|
||||
setSpeed:{
|
||||
// 设置速度
|
||||
operation: OperationEvent.Section.setSpeed.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
|
||||
},
|
||||
fault:{
|
||||
// 区段故障解锁
|
||||
operation: OperationEvent.Section.fault.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK
|
||||
},
|
||||
setFault: {
|
||||
operation: OperationEvent.Section.stoppage.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_ADD_FAULT
|
||||
}
|
||||
},
|
||||
Signal:{
|
||||
arrangementRoute:{
|
||||
// 排列进路
|
||||
operation: OperationEvent.Signal.arrangementRoute.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
|
||||
},
|
||||
cancelTrainRoute:{
|
||||
// 取消进路
|
||||
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
|
||||
},
|
||||
lock:{
|
||||
// 信号封锁
|
||||
operation:OperationEvent.Signal.lock.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_BLOCK
|
||||
},
|
||||
unlock:{
|
||||
// 信号解封
|
||||
operation: OperationEvent.Signal.unlock.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK
|
||||
},
|
||||
guide:{
|
||||
// 进路引导
|
||||
operation: OperationEvent.Signal.guide.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
|
||||
},
|
||||
reopenSignal:{
|
||||
// 信号重开
|
||||
operation: OperationEvent.Signal.reopenSignal.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
|
||||
},
|
||||
signalClose:{
|
||||
// 信号关灯
|
||||
operation: OperationEvent.Signal.signalClose.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
|
||||
},
|
||||
humanControl:{
|
||||
// 进路交人工控
|
||||
operation: OperationEvent.Signal.humanControl.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING
|
||||
},
|
||||
atsAutoControl:{
|
||||
// 进路交自动控
|
||||
operation: OperationEvent.Signal.atsAutoControl.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
|
||||
},
|
||||
setAutoInterlock:{
|
||||
// 设置通过模式
|
||||
operation: OperationEvent.Signal.setAutoInterlock.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
|
||||
},
|
||||
cancelAutoInterlock:{
|
||||
// 取消通过模式
|
||||
operation: OperationEvent.Signal.cancelAutoInterlock.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
|
||||
},
|
||||
detail:{
|
||||
// 查询进路状态
|
||||
operation: OperationEvent.Signal.detail.menu.operation
|
||||
},
|
||||
cancelGuide:{
|
||||
// 人工解锁进路(信号机取消引导)
|
||||
operation: OperationEvent.Signal.cancelGuide.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_GUIDE
|
||||
},
|
||||
setAutoTurnBack:{
|
||||
// 设置自动折返
|
||||
operation: OperationEvent.AutoTurnBack.SetAutoTurnBackButton.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_AUTO_TURN_BACK
|
||||
},
|
||||
cancelAutoTurnBack:{
|
||||
// 取消自动折返
|
||||
operation: OperationEvent.AutoTurnBack.CancelAutoTurnBackButton.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_AUTO_TURN_BACK
|
||||
}
|
||||
},
|
||||
Switch:{
|
||||
lock:{
|
||||
// 道岔单锁(联锁)
|
||||
operation: OperationEvent.Switch.lock.menu.operation,
|
||||
// cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK
|
||||
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK_CHAIN
|
||||
},
|
||||
unlock:{
|
||||
// 道岔解锁(联锁)
|
||||
operation: OperationEvent.Switch.unlock.menu.operation,
|
||||
// cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
|
||||
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK_CHAIN
|
||||
},
|
||||
block:{
|
||||
// 道岔封锁
|
||||
operation: OperationEvent.Switch.block.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_BLOCK
|
||||
},
|
||||
unblock:{
|
||||
// 道岔解封
|
||||
operation: OperationEvent.Switch.unblock.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_UNBLOCK
|
||||
},
|
||||
npChain:{
|
||||
// 道岔定操(联动)
|
||||
operation: OperationEvent.Switch.locate.menu.operation,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_TURN_NP_CHAIN
|
||||
},
|
||||
rpChain:{
|
||||
// 道岔反操(联动)
|
||||
operation: OperationEvent.Switch.reverse.menu.operation,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_TURN_RP_CHAIN
|
||||
},
|
||||
split:{
|
||||
// 区段切除
|
||||
operation: OperationEvent.Switch.split.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_CUT_OFF
|
||||
},
|
||||
active:{
|
||||
// 区段激活
|
||||
operation: OperationEvent.Switch.active.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_ACTIVE
|
||||
},
|
||||
setSpeed:{
|
||||
// 设置临时限速
|
||||
operation: OperationEvent.Switch.setSpeed.menu.operation,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED
|
||||
},
|
||||
alxeEffective:{
|
||||
// 确认计轴有效
|
||||
operation: OperationEvent.Switch.alxeEffective.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_COMFIRMATION_AXLE
|
||||
}
|
||||
},
|
||||
StationStand:{
|
||||
setDetainTrain:{
|
||||
// 设置扣车
|
||||
operation: OperationEvent.StationStand.setDetainTrain.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_HOLD_TRAIN
|
||||
},
|
||||
cancelDetainTrain:{
|
||||
// 取消扣车
|
||||
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN
|
||||
},
|
||||
setDetainTrainAuto:{
|
||||
// 区间列车数量限制
|
||||
operation: OperationEvent.StationStand.setDetainTrainAuto.menu.operation,
|
||||
cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN_AUTO
|
||||
},
|
||||
cancelDetainTrainAuto:{
|
||||
// 取消区间列车数量限制
|
||||
operation: OperationEvent.StationStand.cancelDetainTrainAuto.menu.operation,
|
||||
cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN_AUTO
|
||||
},
|
||||
setBulkBuckleTrain:{
|
||||
// 批量扣车
|
||||
operation: OperationEvent.StationStand.setBulkBuckleTrain.menu.operation,
|
||||
cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN_ALL
|
||||
},
|
||||
cancelBulkBuckleTrain:{
|
||||
// 批量取消扣车
|
||||
operation: OperationEvent.StationStand.cancelBulkBuckleTrain.menu.operation,
|
||||
cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN_ALL
|
||||
},
|
||||
setJumpStop:{
|
||||
// 设置跳停
|
||||
operation: OperationEvent.StationStand.setJumpStop.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_JUMP_STOP
|
||||
},
|
||||
cancelJumpStop:{
|
||||
// 取消跳停
|
||||
operation: OperationEvent.StationStand.cancelJumpStop.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP
|
||||
},
|
||||
setStopTime:{
|
||||
// 停站时间控制
|
||||
operation: OperationEvent.StationStand.setStopTime.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_PARK_TIME
|
||||
},
|
||||
setRunLevel:{
|
||||
// 运行时间控制
|
||||
operation: OperationEvent.StationStand.setRunLevel.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_RUN_TIME
|
||||
},
|
||||
earlyDeparture:{
|
||||
// 设置提前发车
|
||||
operation: OperationEvent.StationStand.earlyDeparture.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_EARLY_DEPART
|
||||
},
|
||||
setBackStrategy:{
|
||||
// 设置折返策略
|
||||
operation: OperationEvent.StationStand.setBackStrategy.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_REENTRY_STRATEGY
|
||||
},
|
||||
detail:{
|
||||
// 查询站台状态
|
||||
operation: OperationEvent.StationStand.detail.menu.operation
|
||||
}
|
||||
},
|
||||
StationControl:{
|
||||
requestCentralControl:{
|
||||
// 请求中控(遥控)
|
||||
operation: OperationEvent.StationControl.requestCentralControl.menu.operation,
|
||||
cmdType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_CENTER_CONTROL
|
||||
},
|
||||
requestStationControl:{
|
||||
// 请求站控
|
||||
operation: OperationEvent.StationControl.requestStationControl.menu.operation,
|
||||
cmdType:CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL
|
||||
},
|
||||
emergencyStationControl:{
|
||||
// 紧急站控
|
||||
operation: OperationEvent.StationControl.emergencyStationControl.menu.operation,
|
||||
cmdType:CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL
|
||||
}
|
||||
},
|
||||
Common: {
|
||||
setFault: {
|
||||
operation: OperationEvent.Section.stoppage.menu.operation,
|
||||
cmdType: CMD.Fault.CMD_SET_FAULT
|
||||
},
|
||||
cancelFault: {
|
||||
operation: OperationEvent.Section.cancelStoppage.menu.operation,
|
||||
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export function commitOperate(operate, paramList, over) {
|
||||
const step = {
|
||||
start: true,
|
||||
operation: operate.operation,
|
||||
param:{}
|
||||
};
|
||||
step.param = paramList;
|
||||
// over 0为首次操作,1为中间操作,2为最后操作,3为直接一次性操作
|
||||
if (over == 0 || over == 3) {
|
||||
const codeList = Object.values(paramList);
|
||||
step.code = codeList[0];
|
||||
}
|
||||
if (over != 0 && over != 3) {
|
||||
delete step.start;
|
||||
}
|
||||
if (over == 2 || over == 3) {
|
||||
step.over = true;
|
||||
step.cmdType = operate.cmdType;
|
||||
}
|
||||
return new Promise(function(resolve, reject) {
|
||||
store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
resolve({ valid: valid, operate: step });
|
||||
}).catch(error=>{
|
||||
reject(error);
|
||||
});
|
||||
});
|
||||
}
|
@ -5,6 +5,7 @@
|
||||
<section-cmd-control ref="sectionCmdControl" />
|
||||
<speed-cmd-control ref="speedCmdControl" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<set-fault ref="setFault" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -15,11 +16,12 @@ import SectionCmdControl from './dialog/sectionCmdControl';
|
||||
import SpeedCmdControl from './dialog/speedCmdControl';
|
||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
// import Handler from '@/scripts/cmdPlugin/Handler';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
|
||||
import {menuOperate, commitOperate} from './utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'SectionMenu',
|
||||
@ -28,7 +30,8 @@ export default {
|
||||
SectionControl,
|
||||
SectionCmdControl,
|
||||
SpeedCmdControl,
|
||||
NoticeInfo
|
||||
NoticeInfo,
|
||||
SetFault
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
@ -75,12 +78,12 @@ export default {
|
||||
{
|
||||
label: '设置故障',
|
||||
handler: this.setStoppage,
|
||||
cmdType: CMD.Section.CMD_SECTION_ADD_FAULT
|
||||
cmdType: CMD.Fault.CMD_SET_FAULT
|
||||
},
|
||||
{
|
||||
label: '取消故障',
|
||||
handler: this.cancelStoppage,
|
||||
cmdType: CMD.Section.CMD_SECTION_REMOVE_FAULT
|
||||
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
||||
}
|
||||
]
|
||||
};
|
||||
@ -133,45 +136,18 @@ export default {
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Section.stoppage.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_ADD_FAULT,
|
||||
param: {
|
||||
sectionCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Section.cancelStoppage.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_REMOVE_FAULT,
|
||||
param: {
|
||||
sectionCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
});
|
||||
},
|
||||
// 故障解锁
|
||||
|
@ -8,6 +8,7 @@
|
||||
<route-hand-control ref="routeHandControl" />
|
||||
<route-detail ref="routeDetail" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<set-fault ref="setFault" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -26,6 +27,8 @@ import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
// import { querySignalStatus } from '@/api/simulation';
|
||||
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
|
||||
import {menuOperate, commitOperate} from './utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'SignalMenu',
|
||||
@ -37,7 +40,8 @@ export default {
|
||||
RouteCmdControl,
|
||||
RouteHandControl,
|
||||
RouteDetail,
|
||||
NoticeInfo
|
||||
NoticeInfo,
|
||||
SetFault
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
@ -109,12 +113,12 @@ export default {
|
||||
{
|
||||
label: this.$t('menu.menuSignal.setFault'),
|
||||
handler: this.setStoppage,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_ADD_FAULT
|
||||
cmdType: CMD.Fault.CMD_SET_FAULT
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSignal.cancelFault'),
|
||||
handler: this.cancelStoppage,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_REMOVE_FAULT
|
||||
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
||||
}
|
||||
]
|
||||
};
|
||||
@ -171,44 +175,18 @@ export default {
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Signal.stoppage.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_ADD_FAULT,
|
||||
param: {
|
||||
signalCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Signal.cancelStoppage.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_REMOVE_FAULT,
|
||||
param: {
|
||||
signalCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
});
|
||||
},
|
||||
// 排列进路
|
||||
|
@ -8,6 +8,7 @@
|
||||
<stand-detain-train-all ref="standDetainTrainAll" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<stand-back-strategy ref="standBackStrategy" />
|
||||
<set-fault ref="setFault" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -26,6 +27,8 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
|
||||
import {menuOperate, commitOperate} from './utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'StationStandMenu',
|
||||
@ -37,7 +40,8 @@ export default {
|
||||
NoticeInfo,
|
||||
StandBackStrategy,
|
||||
StandStopTime,
|
||||
StandDetainTrainAll
|
||||
StandDetainTrainAll,
|
||||
SetFault
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
@ -219,44 +223,18 @@ export default {
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.StationStand.stoppage.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_ADD_FAULT,
|
||||
param: {
|
||||
standCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.StationStand.cancelStoppage.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_REMOVE_FAULT,
|
||||
param: {
|
||||
standCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
});
|
||||
},
|
||||
// 设置扣车
|
||||
|
@ -5,6 +5,7 @@
|
||||
<switch-cmd-control ref="switchCmdControl" />
|
||||
<speed-cmd-control ref="speedCmdControl" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<set-fault ref="setFault" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -19,6 +20,8 @@ import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
|
||||
import {menuOperate, commitOperate} from './utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'SwitchMenu',
|
||||
@ -27,7 +30,8 @@ export default {
|
||||
SwitchControl,
|
||||
SwitchCmdControl,
|
||||
SpeedCmdControl,
|
||||
NoticeInfo
|
||||
NoticeInfo,
|
||||
SetFault
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
@ -80,12 +84,12 @@ export default {
|
||||
{
|
||||
label: '设置故障',
|
||||
handler: this.setStoppage,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_ADD_FAULT
|
||||
cmdType:CMD.Fault.CMD_SET_FAULT
|
||||
},
|
||||
{
|
||||
label: '取消故障',
|
||||
handler: this.cancelStoppage,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_REMOVE_FAULT
|
||||
cmdType:CMD.Fault.CMD_CANCEL_FAULT
|
||||
}
|
||||
]
|
||||
};
|
||||
@ -138,42 +142,18 @@ export default {
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
const step = {
|
||||
start: true,
|
||||
operation: OperationEvent.Switch.stoppage.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_STOPPAGE,
|
||||
param: {
|
||||
switchCode: this.selected.code
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
const step = {
|
||||
start: true,
|
||||
operation: OperationEvent.Switch.cancelStoppage.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_CANCEL_STOPPAGE,
|
||||
param: {
|
||||
switchCode: this.selected.code
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
});
|
||||
},
|
||||
// 道岔单锁
|
||||
|
308
src/jmapNew/theme/haerbin_01/menus/utils/menuOperate.js
Normal file
308
src/jmapNew/theme/haerbin_01/menus/utils/menuOperate.js
Normal file
@ -0,0 +1,308 @@
|
||||
import store from '@/store/index_APP_TARGET';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
// 操作
|
||||
export const menuOperate = {
|
||||
Section:{
|
||||
alxeFailure:{
|
||||
// 设置计轴失效
|
||||
operation: OperationEvent.Section.alxeFailure.menu.operation,
|
||||
// cmdType 值有问题
|
||||
cmdType: CMD.Section.CMD_SECTION_ADD_FAULT
|
||||
},
|
||||
active:{
|
||||
// 区段激活
|
||||
operation: OperationEvent.Section.active.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_ACTIVE
|
||||
},
|
||||
alxeEffective:{
|
||||
// 确认计轴有效
|
||||
operation: OperationEvent.Section.alxeEffective.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_COMFIRMATION_AXLE
|
||||
},
|
||||
split:{
|
||||
// 区段切除
|
||||
operation: OperationEvent.Section.split.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_CUT_OFF
|
||||
},
|
||||
lock:{
|
||||
// 区段封锁
|
||||
operation: OperationEvent.Section.lock.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_BLOCK
|
||||
},
|
||||
unlock:{
|
||||
// 区段解锁
|
||||
operation: OperationEvent.Section.unlock.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_UNBLOCK
|
||||
},
|
||||
setSpeed:{
|
||||
// 设置速度
|
||||
operation: OperationEvent.Section.setSpeed.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
|
||||
},
|
||||
fault:{
|
||||
// 区段故障解锁
|
||||
operation: OperationEvent.Section.fault.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK
|
||||
},
|
||||
setFault: {
|
||||
operation: OperationEvent.Section.stoppage.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_ADD_FAULT
|
||||
}
|
||||
},
|
||||
Signal:{
|
||||
arrangementRoute:{
|
||||
// 排列进路
|
||||
operation: OperationEvent.Signal.arrangementRoute.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
|
||||
},
|
||||
cancelTrainRoute:{
|
||||
// 取消进路
|
||||
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
|
||||
},
|
||||
lock:{
|
||||
// 信号封锁
|
||||
operation:OperationEvent.Signal.lock.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_BLOCK
|
||||
},
|
||||
unlock:{
|
||||
// 信号解封
|
||||
operation: OperationEvent.Signal.unlock.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK
|
||||
},
|
||||
guide:{
|
||||
// 进路引导
|
||||
operation: OperationEvent.Signal.guide.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
|
||||
},
|
||||
reopenSignal:{
|
||||
// 信号重开
|
||||
operation: OperationEvent.Signal.reopenSignal.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
|
||||
},
|
||||
signalClose:{
|
||||
// 信号关灯
|
||||
operation: OperationEvent.Signal.signalClose.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
|
||||
},
|
||||
humanControl:{
|
||||
// 进路交人工控
|
||||
operation: OperationEvent.Signal.humanControl.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING
|
||||
},
|
||||
atsAutoControl:{
|
||||
// 进路交自动控
|
||||
operation: OperationEvent.Signal.atsAutoControl.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
|
||||
},
|
||||
setAutoInterlock:{
|
||||
// 设置通过模式
|
||||
operation: OperationEvent.Signal.setAutoInterlock.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
|
||||
},
|
||||
cancelAutoInterlock:{
|
||||
// 取消通过模式
|
||||
operation: OperationEvent.Signal.cancelAutoInterlock.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
|
||||
},
|
||||
detail:{
|
||||
// 查询进路状态
|
||||
operation: OperationEvent.Signal.detail.menu.operation
|
||||
},
|
||||
cancelGuide:{
|
||||
// 人工解锁进路(信号机取消引导)
|
||||
operation: OperationEvent.Signal.cancelGuide.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_GUIDE
|
||||
},
|
||||
setAutoTurnBack:{
|
||||
// 设置自动折返
|
||||
operation: OperationEvent.AutoTurnBack.SetAutoTurnBackButton.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_AUTO_TURN_BACK
|
||||
},
|
||||
cancelAutoTurnBack:{
|
||||
// 取消自动折返
|
||||
operation: OperationEvent.AutoTurnBack.CancelAutoTurnBackButton.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_AUTO_TURN_BACK
|
||||
}
|
||||
},
|
||||
Switch:{
|
||||
lock:{
|
||||
// 道岔单锁(联锁)
|
||||
operation: OperationEvent.Switch.lock.menu.operation,
|
||||
// cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK
|
||||
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK_CHAIN
|
||||
},
|
||||
unlock:{
|
||||
// 道岔解锁(联锁)
|
||||
operation: OperationEvent.Switch.unlock.menu.operation,
|
||||
// cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
|
||||
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK_CHAIN
|
||||
},
|
||||
block:{
|
||||
// 道岔封锁
|
||||
operation: OperationEvent.Switch.block.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_BLOCK
|
||||
},
|
||||
unblock:{
|
||||
// 道岔解封
|
||||
operation: OperationEvent.Switch.unblock.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_UNBLOCK
|
||||
},
|
||||
npChain:{
|
||||
// 道岔定操(联动)
|
||||
operation: OperationEvent.Switch.locate.menu.operation,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_TURN_NP_CHAIN
|
||||
},
|
||||
rpChain:{
|
||||
// 道岔反操(联动)
|
||||
operation: OperationEvent.Switch.reverse.menu.operation,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_TURN_RP_CHAIN
|
||||
},
|
||||
split:{
|
||||
// 区段切除
|
||||
operation: OperationEvent.Switch.split.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_CUT_OFF
|
||||
},
|
||||
active:{
|
||||
// 区段激活
|
||||
operation: OperationEvent.Switch.active.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_ACTIVE
|
||||
},
|
||||
setSpeed:{
|
||||
// 设置临时限速
|
||||
operation: OperationEvent.Switch.setSpeed.menu.operation,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED
|
||||
},
|
||||
alxeEffective:{
|
||||
// 确认计轴有效
|
||||
operation: OperationEvent.Switch.alxeEffective.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_COMFIRMATION_AXLE
|
||||
}
|
||||
},
|
||||
StationStand:{
|
||||
setDetainTrain:{
|
||||
// 设置扣车
|
||||
operation: OperationEvent.StationStand.setDetainTrain.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_HOLD_TRAIN
|
||||
},
|
||||
cancelDetainTrain:{
|
||||
// 取消扣车
|
||||
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN
|
||||
},
|
||||
setDetainTrainAuto:{
|
||||
// 区间列车数量限制
|
||||
operation: OperationEvent.StationStand.setDetainTrainAuto.menu.operation,
|
||||
cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN_AUTO
|
||||
},
|
||||
cancelDetainTrainAuto:{
|
||||
// 取消区间列车数量限制
|
||||
operation: OperationEvent.StationStand.cancelDetainTrainAuto.menu.operation,
|
||||
cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN_AUTO
|
||||
},
|
||||
setBulkBuckleTrain:{
|
||||
// 批量扣车
|
||||
operation: OperationEvent.StationStand.setBulkBuckleTrain.menu.operation,
|
||||
cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN_ALL
|
||||
},
|
||||
cancelBulkBuckleTrain:{
|
||||
// 批量取消扣车
|
||||
operation: OperationEvent.StationStand.cancelBulkBuckleTrain.menu.operation,
|
||||
cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN_ALL
|
||||
},
|
||||
setJumpStop:{
|
||||
// 设置跳停
|
||||
operation: OperationEvent.StationStand.setJumpStop.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_JUMP_STOP
|
||||
},
|
||||
cancelJumpStop:{
|
||||
// 取消跳停
|
||||
operation: OperationEvent.StationStand.cancelJumpStop.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP
|
||||
},
|
||||
setStopTime:{
|
||||
// 停站时间控制
|
||||
operation: OperationEvent.StationStand.setStopTime.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_PARK_TIME
|
||||
},
|
||||
setRunLevel:{
|
||||
// 运行时间控制
|
||||
operation: OperationEvent.StationStand.setRunLevel.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_RUN_TIME
|
||||
},
|
||||
earlyDeparture:{
|
||||
// 设置提前发车
|
||||
operation: OperationEvent.StationStand.earlyDeparture.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_EARLY_DEPART
|
||||
},
|
||||
setBackStrategy:{
|
||||
// 设置折返策略
|
||||
operation: OperationEvent.StationStand.setBackStrategy.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_REENTRY_STRATEGY
|
||||
},
|
||||
detail:{
|
||||
// 查询站台状态
|
||||
operation: OperationEvent.StationStand.detail.menu.operation
|
||||
}
|
||||
},
|
||||
StationControl:{
|
||||
requestCentralControl:{
|
||||
// 请求中控(遥控)
|
||||
operation: OperationEvent.StationControl.requestCentralControl.menu.operation,
|
||||
cmdType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_CENTER_CONTROL
|
||||
},
|
||||
requestStationControl:{
|
||||
// 请求站控
|
||||
operation: OperationEvent.StationControl.requestStationControl.menu.operation,
|
||||
cmdType:CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL
|
||||
},
|
||||
emergencyStationControl:{
|
||||
// 紧急站控
|
||||
operation: OperationEvent.StationControl.emergencyStationControl.menu.operation,
|
||||
cmdType:CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL
|
||||
}
|
||||
},
|
||||
Common: {
|
||||
setFault: {
|
||||
operation: OperationEvent.Section.stoppage.menu.operation,
|
||||
cmdType: CMD.Fault.CMD_SET_FAULT
|
||||
},
|
||||
cancelFault: {
|
||||
operation: OperationEvent.Section.cancelStoppage.menu.operation,
|
||||
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export function commitOperate(operate, paramList, over) {
|
||||
const step = {
|
||||
start: true,
|
||||
operation: operate.operation,
|
||||
param:{}
|
||||
};
|
||||
step.param = paramList;
|
||||
// over 0为首次操作,1为中间操作,2为最后操作,3为直接一次性操作
|
||||
if (over == 0 || over == 3) {
|
||||
const codeList = Object.values(paramList);
|
||||
step.code = codeList[0];
|
||||
}
|
||||
if (over != 0 && over != 3) {
|
||||
delete step.start;
|
||||
}
|
||||
if (over == 2 || over == 3) {
|
||||
step.over = true;
|
||||
step.cmdType = operate.cmdType;
|
||||
}
|
||||
return new Promise(function(resolve, reject) {
|
||||
store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
resolve({ valid: valid, operate: step });
|
||||
}).catch(error=>{
|
||||
reject(error);
|
||||
});
|
||||
});
|
||||
}
|
@ -22,7 +22,7 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import {menuOperate, commitOperate} from './utils/menuOperate';
|
||||
import SetFault from './dialog/setFault';
|
||||
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
|
||||
|
||||
export default {
|
||||
name: 'SectionMenu',
|
||||
@ -98,20 +98,15 @@ export default {
|
||||
]
|
||||
},
|
||||
menuForce: [
|
||||
// {
|
||||
// label: '设置计轴失效', // 设置区段故障
|
||||
// handler: this.alxeFailure,
|
||||
// cmdType: CMD.Section.CMD_SECTION_ADD_FAULT
|
||||
// },
|
||||
{
|
||||
label: this.$t('menu.menuSection.setFault'),
|
||||
handler: this.setStoppage,
|
||||
cmdType: CMD.Section.CMD_SECTION_ADD_FAULT
|
||||
cmdType: CMD.Fault.CMD_SET_FAULT
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSection.cancelFault'),
|
||||
handler: this.cancelStoppage,
|
||||
cmdType: CMD.Section.CMD_SECTION_REMOVE_FAULT
|
||||
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
||||
}
|
||||
]
|
||||
};
|
||||
@ -228,14 +223,22 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
commitOperate(menuOperate.Section.setFault, { sectionCode: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(operate, this.selected);
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
cancelStoppage() {}
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
@ -8,7 +8,8 @@
|
||||
<route-hand-control ref="routeHandControl" />
|
||||
<route-detail ref="routeDetail" />
|
||||
<router-command ref="routerCommand" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<notice-info ref="noticeInfo" />\
|
||||
<set-fault ref="setFault" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -26,9 +27,8 @@ import {menuOperate, commitOperate} from './utils/menuOperate';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
// import { querySignalStatus } from '@/api/simulation';
|
||||
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
|
||||
|
||||
export default {
|
||||
name: 'SignalMenu',
|
||||
@ -41,7 +41,8 @@ export default {
|
||||
RouteHandControl,
|
||||
RouteDetail,
|
||||
RouterCommand,
|
||||
NoticeInfo
|
||||
NoticeInfo,
|
||||
SetFault
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
@ -166,20 +167,15 @@ export default {
|
||||
]
|
||||
},
|
||||
menuForce: [
|
||||
{
|
||||
label: '信号关灯',
|
||||
handler: this.signalClose,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
|
||||
},
|
||||
{
|
||||
label: '设置故障',
|
||||
handler: this.setStoppage,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_ADD_FAULT
|
||||
cmdType: CMD.Fault.CMD_SET_FAULT
|
||||
},
|
||||
{
|
||||
label: '取消故障',
|
||||
handler: this.cancelStoppage,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_REMOVE_FAULT
|
||||
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
||||
}
|
||||
]
|
||||
};
|
||||
@ -235,50 +231,6 @@ export default {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Signal.stoppage.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_ADD_FAULT,
|
||||
param: {
|
||||
signalCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.mouseCancelState(this.selected);
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Signal.cancelStoppage.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_REMOVE_FAULT,
|
||||
param: {
|
||||
signalCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.mouseCancelState(this.selected);
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 获取进路列表
|
||||
getRouteList(selectType) {
|
||||
const routes = [];
|
||||
@ -392,6 +344,22 @@ export default {
|
||||
this.$refs.routerCommand.doShow(operate, this.selected, '是否执行引导命令?');
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -9,6 +9,7 @@
|
||||
<stand-back-strategy ref="standBackStrategy" />
|
||||
<StandBulkBuckleTrain ref="standBulkBuckleTrain" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<set-fault ref="setFault" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -28,6 +29,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
|
||||
|
||||
export default {
|
||||
name: 'StationStandMenu',
|
||||
@ -40,7 +42,8 @@ export default {
|
||||
StandRunLevel,
|
||||
NoticeInfo,
|
||||
StandBackStrategy,
|
||||
StandStopTime
|
||||
StandStopTime,
|
||||
SetFault
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
@ -201,44 +204,18 @@ export default {
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.StationStand.stoppage.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_ADD_FAULT,
|
||||
param: {
|
||||
standCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.StationStand.cancelStoppage.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_REMOVE_FAULT,
|
||||
param: {
|
||||
standCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 设置扣车
|
||||
|
@ -6,6 +6,7 @@
|
||||
<speed-limit-control ref="speedLimitControl" />
|
||||
<alxe-effective ref="alxeEffective" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<set-fault ref="setFault" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -17,9 +18,9 @@ import SpeedLimitControl from './dialog/speedLimitControl';
|
||||
import AlxeEffective from './dialog/alxeEffective';
|
||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||
import { mapGetters } from 'vuex';
|
||||
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
|
||||
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import {menuOperate, commitOperate} from './utils/menuOperate';
|
||||
@ -32,7 +33,8 @@ export default {
|
||||
SwitchUnLock,
|
||||
SpeedLimitControl,
|
||||
AlxeEffective,
|
||||
NoticeInfo
|
||||
NoticeInfo,
|
||||
SetFault
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
@ -129,12 +131,12 @@ export default {
|
||||
{
|
||||
label: '设置故障',
|
||||
handler: this.setStoppage,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_ADD_FAULT
|
||||
cmdType: CMD.Fault.CMD_SET_FAULT
|
||||
},
|
||||
{
|
||||
label: '取消故障',
|
||||
handler: this.cancelStoppage,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_REMOVE_FAULT
|
||||
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
||||
}
|
||||
]
|
||||
};
|
||||
@ -184,50 +186,6 @@ export default {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Switch.stoppage.menu.operation,
|
||||
param: {
|
||||
switchCode: this.selected.code
|
||||
}
|
||||
};
|
||||
|
||||
this.mouseCancelState(this.selected);
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Switch.cancelStoppage.menu.operation,
|
||||
param: {
|
||||
switchCode: this.selected.code
|
||||
}
|
||||
};
|
||||
|
||||
this.mouseCancelState(this.selected);
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 定操定位
|
||||
locate() {
|
||||
commitOperate(menuOperate.Switch.npChain, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
@ -315,6 +273,22 @@ export default {
|
||||
callback: action => {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -263,6 +263,16 @@ export const menuOperate = {
|
||||
operation: OperationEvent.StationControl.emergencyStationControl.menu.operation,
|
||||
cmdType:CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL
|
||||
}
|
||||
},
|
||||
Common: {
|
||||
setFault: {
|
||||
operation: OperationEvent.Section.stoppage.menu.operation,
|
||||
cmdType: CMD.Fault.CMD_SET_FAULT
|
||||
},
|
||||
cancelFault: {
|
||||
operation: OperationEvent.Section.cancelStoppage.menu.operation,
|
||||
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -17,11 +17,10 @@ import SpeedCmdControl from './dialog/speedCmdControl';
|
||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import { menuOperate, commitOperate } from './utils/menuOperate';
|
||||
import SetFault from './dialog/setFault';
|
||||
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
|
||||
|
||||
export default {
|
||||
name: 'SectionMenu',
|
||||
@ -113,14 +112,14 @@ export default {
|
||||
},
|
||||
menuForce: [
|
||||
{
|
||||
label: this.$t('menu.menuSection.setFault'),
|
||||
label: '设置故障',
|
||||
handler: this.setStoppage,
|
||||
cmdType: CMD.Section.CMD_SECTION_ADD_FAULT
|
||||
cmdType: CMD.Fault.CMD_SET_FAULT
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSection.cancelFault'),
|
||||
label: '取消故障',
|
||||
handler: this.cancelStoppage,
|
||||
cmdType: CMD.Section.CMD_SECTION_REMOVE_FAULT
|
||||
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
||||
}
|
||||
]
|
||||
};
|
||||
@ -175,7 +174,7 @@ export default {
|
||||
setStoppage() {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(operate, this.selected);
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -183,7 +182,7 @@ export default {
|
||||
cancelStoppage() {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(operate, this.selected);
|
||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
@ -8,7 +8,7 @@
|
||||
<route-hand-control ref="routeHandControl" />
|
||||
<route-detail ref="routeDetail" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<set-fault ref="setFault" />
|
||||
<set-fault ref="setFault" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -24,10 +24,9 @@ import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import { menuOperate, commitOperate } from './utils/menuOperate';
|
||||
import SetFault from './dialog/setFault';
|
||||
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
|
||||
|
||||
export default {
|
||||
name: 'SignalMenu',
|
||||
@ -40,7 +39,7 @@ export default {
|
||||
RouteHandControl,
|
||||
RouteDetail,
|
||||
NoticeInfo,
|
||||
SetFault
|
||||
SetFault
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
@ -166,14 +165,14 @@ export default {
|
||||
},
|
||||
menuForce: [
|
||||
{
|
||||
label: this.$t('menu.menuSignal.setFault'),
|
||||
label: '设置故障',
|
||||
handler: this.setStoppage,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_ADD_FAULT
|
||||
cmdType: CMD.Fault.CMD_SET_FAULT
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSignal.cancelFault'),
|
||||
label: '取消故障',
|
||||
handler: this.cancelStoppage,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_REMOVE_FAULT
|
||||
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
||||
}
|
||||
]
|
||||
};
|
||||
@ -232,7 +231,7 @@ export default {
|
||||
setStoppage() {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(operate, this.selected);
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -240,7 +239,7 @@ export default {
|
||||
cancelStoppage() {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(operate, this.selected);
|
||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
@ -81,6 +81,16 @@ export default {
|
||||
cmdType: CMD.Station.active
|
||||
}
|
||||
// {
|
||||
// label: '所有进路交人工控',
|
||||
// handler: this.humanControlALL,
|
||||
// cmdType: ''
|
||||
// },
|
||||
// {
|
||||
// label: '所有进路交ATS自动控',
|
||||
// handler: this.atsAutoControlALL,
|
||||
// cmdType: ''
|
||||
// }
|
||||
// {
|
||||
// label: '执行关键操作测试',
|
||||
// handler: this.execKeyOperationTest,
|
||||
// cmdType: CMD.Station.active,
|
||||
|
@ -8,6 +8,7 @@
|
||||
<stand-detain-train-all ref="standDetainTrainAll" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<stand-back-strategy ref="standBackStrategy" />
|
||||
<set-fault ref="setFault" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -26,6 +27,7 @@ import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import { menuOperate, commitOperate } from './utils/menuOperate';
|
||||
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
|
||||
|
||||
export default {
|
||||
name: 'StationStandMenu',
|
||||
@ -37,7 +39,8 @@ export default {
|
||||
NoticeInfo,
|
||||
StandBackStrategy,
|
||||
StandStopTime,
|
||||
StandDetainTrainAll
|
||||
StandDetainTrainAll,
|
||||
SetFault
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
@ -191,44 +194,18 @@ export default {
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.StationStand.stoppage.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_ADD_FAULT,
|
||||
param: {
|
||||
standCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.StationStand.cancelStoppage.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_REMOVE_FAULT,
|
||||
param: {
|
||||
standCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
});
|
||||
},
|
||||
// 设置扣车
|
||||
|
@ -17,11 +17,10 @@ import SpeedCmdControl from './dialog/speedCmdControl';
|
||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import { menuOperate, commitOperate } from './utils/menuOperate';
|
||||
import SetFault from './dialog/setFault';
|
||||
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
|
||||
|
||||
export default {
|
||||
name: 'SwitchMenu',
|
||||
@ -157,20 +156,14 @@ export default {
|
||||
},
|
||||
menuForce: [
|
||||
{
|
||||
label: this.$t('menu.menuSwitch.setFault'),
|
||||
label: '设置故障',
|
||||
handler: this.setStoppage,
|
||||
auth: {
|
||||
|
||||
},
|
||||
cmdType:CMD.Switch.CMD_SWITCH_ADD_FAULT
|
||||
cmdType: CMD.Fault.CMD_SET_FAULT
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuSwitch.cancelFault'),
|
||||
label: '取消故障',
|
||||
handler: this.cancelStoppage,
|
||||
auth: {
|
||||
|
||||
},
|
||||
cmdType:CMD.Switch.CMD_SWITCH_REMOVE_FAULT
|
||||
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
||||
}
|
||||
]
|
||||
};
|
||||
@ -227,7 +220,7 @@ export default {
|
||||
setStoppage() {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(operate, this.selected);
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -235,7 +228,7 @@ export default {
|
||||
cancelStoppage() {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(operate, this.selected);
|
||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
@ -228,6 +228,12 @@ export default {
|
||||
.xian-02__system .el-dialog .el-button:disabled span {
|
||||
border: 0px;
|
||||
}
|
||||
.xian-02__system .el-select-dropdown__item {
|
||||
background: #5F9EA0;
|
||||
}
|
||||
.xian-02__system .el-select-dropdown__list {
|
||||
background: #5F9EA0;
|
||||
}
|
||||
.xian-02__select-option .el-select-dropdown__item{
|
||||
background: #5F9EA0;
|
||||
}
|
||||
@ -296,9 +302,9 @@ export default {
|
||||
line-height: 22px !important;
|
||||
}
|
||||
|
||||
.xian-02__system .el-dialog .el-input.is-disabled .el-input__inner {
|
||||
background: #F0F0F0 !important;
|
||||
}
|
||||
/*.xian-02__system .el-dialog .el-input.is-disabled .el-input__inner {*/
|
||||
/*background: #F0F0F0 !important;*/
|
||||
/*}*/
|
||||
|
||||
.xian-02__system .el-dialog .el-textarea {
|
||||
border-style:solid;
|
||||
|
@ -6,6 +6,7 @@
|
||||
<speed-limit-control ref="speedLimitControl" />
|
||||
<alxe-effective ref="alxeEffective" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<set-fault ref="setFault" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -22,6 +23,7 @@ import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
// import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import {menuOperate, commitOperate} from './utils/menuOperate';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
|
||||
|
||||
export default {
|
||||
name: 'SectionMenu',
|
||||
@ -31,7 +33,8 @@ export default {
|
||||
SectionUnLock,
|
||||
SpeedLimitControl,
|
||||
AlxeEffective,
|
||||
NoticeInfo
|
||||
NoticeInfo,
|
||||
SetFault
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
@ -116,9 +119,14 @@ export default {
|
||||
},
|
||||
menuForce: [
|
||||
{
|
||||
label: '设置计轴失效', // 设置区段故障
|
||||
handler: this.alxeFailure,
|
||||
cmdType: CMD.Section.CMD_SECTION_ADD_FAULT
|
||||
label: '设置故障',
|
||||
handler: this.setStoppage,
|
||||
cmdType: CMD.Fault.CMD_SET_FAULT
|
||||
},
|
||||
{
|
||||
label: '取消故障',
|
||||
handler: this.cancelStoppage,
|
||||
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
||||
}
|
||||
]
|
||||
};
|
||||
@ -170,12 +178,20 @@ export default {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
// 设置计轴失效
|
||||
alxeFailure() {
|
||||
this.mouseCancelState(this.selected);
|
||||
commitOperate(menuOperate.Section.alxeFailure, {sectionCode:this.selected.code}, 3).then(({valid, operate})=>{
|
||||
}).catch((error)=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 故障解锁
|
||||
|
@ -9,6 +9,7 @@
|
||||
<route-detail ref="routeDetail" />
|
||||
<router-command ref="routerCommand" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<set-fault ref="setFault" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -28,7 +29,7 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
// import { querySignalStatus } from '@/api/simulation';
|
||||
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
|
||||
|
||||
export default {
|
||||
name: 'SignalMenu',
|
||||
@ -41,7 +42,8 @@ export default {
|
||||
RouteHandControl,
|
||||
RouteDetail,
|
||||
RouterCommand,
|
||||
NoticeInfo
|
||||
NoticeInfo,
|
||||
SetFault
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
@ -188,20 +190,15 @@ export default {
|
||||
}
|
||||
],
|
||||
menuForce: [
|
||||
{
|
||||
label: '信号关灯',
|
||||
handler: this.signalClose,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
|
||||
},
|
||||
{
|
||||
label: '设置故障',
|
||||
handler: this.setStoppage,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_ADD_FAULT
|
||||
cmdType: CMD.Fault.CMD_SET_FAULT
|
||||
},
|
||||
{
|
||||
label: '取消故障',
|
||||
handler: this.cancelStoppage,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_REMOVE_FAULT
|
||||
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
||||
}
|
||||
]
|
||||
};
|
||||
@ -269,46 +266,18 @@ export default {
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Signal.stoppage.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_ADD_FAULT,
|
||||
param: {
|
||||
signalCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.mouseCancelState(this.selected);
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Signal.cancelStoppage.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_REMOVE_FAULT,
|
||||
param: {
|
||||
signalCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.mouseCancelState(this.selected);
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
});
|
||||
},
|
||||
// 获取进路列表
|
||||
|
@ -124,6 +124,7 @@ import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import PlatformDwell from './dialog/platformDwell';
|
||||
import { DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
|
||||
export default {
|
||||
name: 'MenuStationStand',
|
||||
@ -153,6 +154,9 @@ export default {
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
'operatemode'
|
||||
]),
|
||||
...mapGetters('menuOperation', [
|
||||
'buttonOperation'
|
||||
]),
|
||||
@ -172,7 +176,7 @@ export default {
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.StationStand) && !this.buttonOperation) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.StationStand) && !this.buttonOperation && this.operatemode !== OperateMode.FAULT) {
|
||||
this.stationList.forEach(item => {
|
||||
if (item.code === this.$store.state.menuOperation.selected.stationCode) {
|
||||
if ((this.mapConfig.upDirection === 'right' && this.$store.state.menuOperation.selected.right) || (this.mapConfig.upDirection === 'left' && !this.$store.state.menuOperation.selected.right)) {
|
||||
|
@ -6,6 +6,7 @@
|
||||
<speed-limit-control ref="speedLimitControl" />
|
||||
<alxe-effective ref="alxeEffective" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<set-fault ref="setFault" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -23,6 +24,7 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import {menuOperate, commitOperate} from './utils/menuOperate';
|
||||
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
|
||||
|
||||
export default {
|
||||
name: 'SwitchMenu',
|
||||
@ -32,7 +34,8 @@ export default {
|
||||
SwitchUnLock,
|
||||
SpeedLimitControl,
|
||||
AlxeEffective,
|
||||
NoticeInfo
|
||||
NoticeInfo,
|
||||
SetFault
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
@ -146,12 +149,12 @@ export default {
|
||||
{
|
||||
label: '设置故障',
|
||||
handler: this.setStoppage,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_ADD_FAULT
|
||||
cmdType: CMD.Fault.CMD_SET_FAULT
|
||||
},
|
||||
{
|
||||
label: '取消故障',
|
||||
handler: this.cancelStoppage,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_REMOVE_FAULT
|
||||
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
||||
}
|
||||
]
|
||||
};
|
||||
@ -238,26 +241,20 @@ export default {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Switch.cancelStoppage.menu.operation,
|
||||
param: {
|
||||
switchCode: this.selected.code
|
||||
}
|
||||
};
|
||||
|
||||
this.mouseCancelState(this.selected);
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
// 定操定位
|
||||
|
@ -5,6 +5,7 @@
|
||||
<update-stand-plan ref="updateStandPlan" :selected="selected" />
|
||||
<warning-confirm ref="warningConfirm" :selected="selected" />
|
||||
<stop-profile ref="stopProfile" :selected="selected" />
|
||||
<set-fault ref="setFault" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -16,8 +17,10 @@ import WarningConfirm from './dialog/warningConfirm';
|
||||
import StopProfile from './dialog/stopProfile';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
|
||||
import {menuOperate, commitOperate} from './utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'StationStandMenu',
|
||||
@ -26,7 +29,8 @@ export default {
|
||||
NoticeInfo,
|
||||
UpdateStandPlan,
|
||||
WarningConfirm,
|
||||
StopProfile
|
||||
StopProfile,
|
||||
SetFault
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
@ -186,12 +190,12 @@ export default {
|
||||
{
|
||||
label: '设置故障',
|
||||
handler: this.setStoppage,
|
||||
cmdType: CMD.Stand.CMD_STAND_ADD_FAULT
|
||||
cmdType: CMD.Fault.CMD_SET_FAULT
|
||||
},
|
||||
{
|
||||
label: '取消故障',
|
||||
handler: this.cancelStoppage,
|
||||
cmdType: CMD.Stand.CMD_STAND_REMOVE_FAULT
|
||||
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
||||
}
|
||||
]
|
||||
};
|
||||
@ -205,6 +209,15 @@ export default {
|
||||
'buttonOperation'
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.StationStand) && !this.buttonOperation && this.operatemode === OperateMode.FAULT) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clickEvent() {
|
||||
const self = this;
|
||||
@ -267,47 +280,18 @@ export default {
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
const step = {
|
||||
start: true,
|
||||
over:true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.StationStand.stoppage.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_ADD_FAULT,
|
||||
param: {
|
||||
standCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
const step = {
|
||||
start: true,
|
||||
over:true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.StationStand.cancelStoppage.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_REMOVE_FAULT,
|
||||
param: {
|
||||
standCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
});
|
||||
},
|
||||
// 设置跳停
|
||||
|
@ -257,6 +257,16 @@ export const menuOperate = {
|
||||
operation: OperationEvent.StationControl.emergencyStationControl.menu.operation,
|
||||
cmdType:CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL
|
||||
}
|
||||
},
|
||||
Common: {
|
||||
setFault: {
|
||||
operation: OperationEvent.Section.stoppage.menu.operation,
|
||||
cmdType: CMD.Fault.CMD_SET_FAULT
|
||||
},
|
||||
cancelFault: {
|
||||
operation: OperationEvent.Section.cancelStoppage.menu.operation,
|
||||
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -44,6 +44,10 @@ function getRouteInfo(to) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (whiteList.includes(toRoutePath)) {
|
||||
removeToken();
|
||||
}
|
||||
|
||||
if (isDesignPage(toRoutePath)) {
|
||||
const whitePage = PermissionParam[current_session] ? PermissionParam[current_session].whitePage : '';
|
||||
loginPath = whitePage || loginDesignPage;
|
||||
@ -114,13 +118,14 @@ router.beforeEach((to, from, next) => {
|
||||
}
|
||||
} else {
|
||||
// 继电器使用
|
||||
// console.log(to);
|
||||
// 未登录情况下
|
||||
if (whiteList.indexOf(to.path) !== -1) {
|
||||
// 在免登录白名单,直接进入
|
||||
next();
|
||||
} else if (to.path.substr(0, 13) == whiteList[2]) {
|
||||
next();
|
||||
} else if (to.path == '/jsxtApply') {
|
||||
next();
|
||||
} else {
|
||||
// 否则全部重定向到登录页
|
||||
next(routeInfo.loginPath);
|
||||
|
@ -15,6 +15,8 @@ const Jlmap3dPassFlow = () => import('@/views/jlmap3d/passflow/jl3dpassflow');
|
||||
const Jlmap3dStation = () => import('@/views/jlmap3d/station/jl3dstation');
|
||||
const Jlmap3dModel = () => import('@/views/jlmap3d/device/jl3ddevice');
|
||||
const Jlmap3dTrain = () => import('@/views/jlmap3d/devicetrain/jl3ddevicetrain');
|
||||
const Jl3dMaintainer = () => import('@/views/jlmap3d/maintainer/jl3dmaintainer');
|
||||
|
||||
const Display = () => import('@/views/display/index');
|
||||
const DisplayNew = () => import('@/views/newMap/displayNew/index');
|
||||
const DesignDisplay = () => import('@/views/display/designIndex');
|
||||
@ -121,8 +123,14 @@ const DeviceManage = () => import('@/views/system/deviceManage/index');
|
||||
const MapSort = () => import('@/views/publish/publishMap/mapSort');
|
||||
const StudentManage = () => import('@/views/studentManage');
|
||||
|
||||
const CompetitionManage = () => import('@/views/competition/index');
|
||||
const RefereeList = () => import('@/views/refereeList/index');
|
||||
const CompetitionDetail = () => import('@/views/jsxt/competition/examDetail');
|
||||
const CompetitionManage = () => import('@/views/jsxt/competition/index');
|
||||
const CompetitionHome = () => import('@/views/jsxt/competition/home');
|
||||
const Refereedetail = () => import('@/views/jsxt/competition/theory/quiz/index');
|
||||
const JsxtApply = () => import('@/views/jsxt/apply/index');
|
||||
// const theoryManage = () => import('@/views/jsxt/competition/theory/index');
|
||||
const RefereeList = () => import('@/views/jsxt/refereeList/index');
|
||||
const homeJsxt = () => import('@/views/jsxt/home/index');
|
||||
|
||||
import { loginInfo, GenerateRouteProjectList } from '@/scripts/ProjectConfig';
|
||||
import { getSessionStorage } from '@/utils/auth';
|
||||
@ -151,6 +159,7 @@ export const mapCreater = '02'; // 地图创建权限
|
||||
export const lessonCreater = '03'; // 课程创建权限
|
||||
export const admin = '04'; // 管理员
|
||||
export const superAdmin = '05'; // 超级管理员
|
||||
export const referee = '07'; // 裁判员
|
||||
|
||||
export const userExam = '011'; // 考试系统
|
||||
export const userLesson = '012'; // 教学系统
|
||||
@ -158,6 +167,7 @@ export const userSimulation = '013'; // 仿真系统
|
||||
export const userScreen = '014'; // 大屏系统
|
||||
export const userPlan = '015'; // 计划系统
|
||||
export const userTrainingPlatform = '016'; // 实训平台
|
||||
export const refereePlatform = '017';
|
||||
// const isDev = process.env.NODE_ENV === 'development';
|
||||
|
||||
/**
|
||||
@ -214,7 +224,13 @@ export const constantRoutes = [
|
||||
component: Error401,
|
||||
hidden: true
|
||||
},
|
||||
|
||||
{ // 竞赛系统报名
|
||||
path: '/jsxtApply',
|
||||
component: JsxtApply,
|
||||
meta: {
|
||||
},
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/404',
|
||||
component: Errpr404,
|
||||
@ -959,59 +975,113 @@ export const asyncRouter = [
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/design/student',
|
||||
redirect: '/design/student/home',
|
||||
component: Layout,
|
||||
meta: {
|
||||
i18n: 'router.studentManage',
|
||||
roles: [admin, lessonCreater]
|
||||
},
|
||||
hidden: getSessionStorage('project') ? !getSessionStorage('project').endsWith('gzb') && !window.document.location.pathname.includes('gzb') : !window.document.location.pathname.includes('gzb'),
|
||||
children: [
|
||||
{
|
||||
path: 'home',
|
||||
component: StudentManage,
|
||||
meta: {
|
||||
i18n: 'router.studentManage',
|
||||
icon: 'design',
|
||||
hidden: true
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
const JSXT = [
|
||||
export const projectRoute = {
|
||||
designgzb: [
|
||||
{
|
||||
path: '/design/student',
|
||||
redirect: '/design/student/home',
|
||||
component: Layout,
|
||||
meta: {
|
||||
i18n: 'router.studentManage',
|
||||
roles: [admin, lessonCreater]
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'home',
|
||||
component: StudentManage,
|
||||
meta: {
|
||||
i18n: 'router.studentManage',
|
||||
icon: 'design',
|
||||
hidden: true
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
export const JSXT = [
|
||||
{
|
||||
path: '/jsxt',
|
||||
redirect: '/jsxt/home',
|
||||
component: Layout,
|
||||
meta: {
|
||||
i18n: 'router.competitionManage',
|
||||
roles: [user, userTrainingPlatform]
|
||||
roles: [user, userTrainingPlatform, referee]
|
||||
},
|
||||
pathStr: 'jsxt',
|
||||
hidden: getSessionStorage('project') ? !getSessionStorage('project').endsWith('jsxt') && !window.document.location.pathname.includes('jsxt') : !window.document.location.pathname.includes('jsxt'),
|
||||
children: [
|
||||
{
|
||||
path: 'home',
|
||||
path: '',
|
||||
redirect: '/jsxt/home',
|
||||
component: CompetitionManage,
|
||||
meta: {
|
||||
i18n: 'router.competitionManage',
|
||||
icon: 'design',
|
||||
hidden: true
|
||||
}
|
||||
icon: 'design'
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'home',
|
||||
component: CompetitionHome,
|
||||
meta: {
|
||||
hidden: true
|
||||
}
|
||||
},
|
||||
// {
|
||||
// path: 'theory/:id',
|
||||
// component: theoryManage,
|
||||
// meta: {
|
||||
// hidden: true
|
||||
// }
|
||||
// },
|
||||
{
|
||||
path: 'examDetail',
|
||||
component: CompetitionDetail,
|
||||
meta: {
|
||||
il8n: 'router.examDetail',
|
||||
icon: 'design',
|
||||
hidden: true
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/jsxt/theory/detail/:id',
|
||||
component: Refereedetail,
|
||||
meta: {
|
||||
hidden: true
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/refereeJsxt',
|
||||
component: Layout,
|
||||
meta: {
|
||||
i18n: 'router.refereeJManage',
|
||||
roles: [admin, userTrainingPlatform]
|
||||
i18n: 'router.homeJsxt',
|
||||
roles: [user, referee, refereePlatform]
|
||||
},
|
||||
hidden: getSessionStorage('project') ? !getSessionStorage('project').endsWith('refereeJsxt') && !window.document.location.pathname.includes('refereeJsxt') : !window.document.location.pathname.includes('refereeJsxt'),
|
||||
children: [
|
||||
{
|
||||
path: 'preview',
|
||||
component: homeJsxt,
|
||||
meta: {
|
||||
i18n: 'router.homeJsxt',
|
||||
icon: 'design',
|
||||
hidden: true
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/referee',
|
||||
component: Layout,
|
||||
meta: {
|
||||
i18n: 'router.refereeJManage',
|
||||
roles: [referee, refereePlatform]
|
||||
},
|
||||
pathStr: 'refereeJsxt',
|
||||
hidden: getSessionStorage('project') ? !getSessionStorage('project').endsWith('refereeJsxt') && !window.document.location.pathname.includes('refereeJsxt') : !window.document.location.pathname.includes('refereeJsxt'),
|
||||
children: [
|
||||
{
|
||||
@ -1036,11 +1106,6 @@ const router = createRouter();
|
||||
|
||||
router.beforeEach((to, from, next) => {
|
||||
const project = getSessionStorage('project');
|
||||
JSXT.forEach(route => {
|
||||
if (from.path.includes(route.pathStr)) {
|
||||
asyncRouter.push(route);
|
||||
}
|
||||
});
|
||||
document.title = loginInfo[project || 'login'].browserTitle || loginInfo[project || 'login'].title;
|
||||
next();
|
||||
});
|
||||
|
@ -37,7 +37,8 @@ export default {
|
||||
{ label: '课程生成者', value: '03' },
|
||||
{ label: '系统管理员', value: '04' },
|
||||
{ label: '超级管理员', value: '05' },
|
||||
{ label: '销售用户', value: '06' }
|
||||
{ label: '销售用户', value: '06' },
|
||||
{ label: '裁判员', value: '07' }
|
||||
],
|
||||
|
||||
examResultList: [
|
||||
|
@ -114,3 +114,24 @@ Vue.prototype.$copyClone = function(obj1, obj2 = {}) {
|
||||
}
|
||||
return obj1;
|
||||
};
|
||||
|
||||
Vue.prototype.$escapeHTML = function (context) {
|
||||
const pattern = /<\w*>(.*)<\/\w*>/;
|
||||
|
||||
if (pattern.test(context)) {
|
||||
context = pattern.exec(context)[1];
|
||||
}
|
||||
|
||||
context = context.replace(/</g, '<');
|
||||
context = context.replace(/>/g, '>');
|
||||
|
||||
return `${context}`;
|
||||
};
|
||||
|
||||
Vue.prototype.$str2number = function(str) {
|
||||
return parseInt(str);
|
||||
};
|
||||
|
||||
Vue.prototype.$asc2chart = function(ascii) {
|
||||
return String.fromCharCode(ascii);
|
||||
};
|
||||
|
@ -142,7 +142,7 @@ export const PermissionParam = { // 路径权限处理所需参数配置(跳
|
||||
refereeJsxt: {
|
||||
whitePage: '/refereeJsxt/login',
|
||||
reg: /^\/refereeJsxt/,
|
||||
clientId: null
|
||||
clientId: LoginParams.Design.clientId
|
||||
}
|
||||
};
|
||||
export const ProjectList = [
|
||||
|
@ -22,7 +22,7 @@ class CommandHandle {
|
||||
};
|
||||
(list || []).forEach(definition => {
|
||||
this.definitionMap[definition.simulationRole][definition.operate] = definition;
|
||||
this.scriptDefinitionMap[definition.id] = definition;
|
||||
this.scriptDefinitionMap[definition.operate] = definition;
|
||||
});
|
||||
}
|
||||
|
||||
@ -35,9 +35,9 @@ class CommandHandle {
|
||||
}
|
||||
}
|
||||
|
||||
getScriptDefinition(operationId) {
|
||||
if (operationId) {
|
||||
return this.scriptDefinitionMap[operationId] || null;
|
||||
getScriptDefinition(operationType) {
|
||||
if (operationType) {
|
||||
return this.scriptDefinitionMap[operationType] || null;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
@ -29,14 +29,17 @@ export const MapDeviceType = {
|
||||
/** 设备故障类型 */
|
||||
export const deviceFaultType = {
|
||||
Section: [
|
||||
{label: '计轴故障', value: 'FAULT'},
|
||||
{label: '计轴干扰', value: 'DISTURBANCE'}
|
||||
{label: '计轴故障', value: 'FAULT'}
|
||||
// {label: '计轴干扰', value: 'DISTURBANCE'}
|
||||
],
|
||||
Signal: [
|
||||
{label: '主灯丝熔断故障', value: 'MAIN_FILAMENT_BROKEN'}
|
||||
],
|
||||
Switch: [
|
||||
{label: '挤岔', value: 'SPLIT'}
|
||||
],
|
||||
StationStand: [
|
||||
{label: '屏蔽门无法关闭', value: 'FAULT'}
|
||||
]
|
||||
};
|
||||
/** 设备类型 */
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { asyncRouter, constantRoutes, user, userLesson, userExam, userSimulation, userScreen, userPlan, superAdmin, admin, userTrainingPlatform } from '@/router/index_APP_TARGET';
|
||||
import { asyncRouter, constantRoutes, user, userLesson, userExam, userSimulation, userScreen, userPlan, superAdmin, admin, userTrainingPlatform, JSXT, refereePlatform, projectRoute } from '@/router/index_APP_TARGET';
|
||||
import { PermissionType } from '@/utils/PermissionType';
|
||||
import { UrlConfig } from '@/scripts/ConstDic';
|
||||
import { getSessionStorage } from '@/utils/auth';
|
||||
@ -26,16 +26,22 @@ function setHonePagePath(route, roles) {
|
||||
*/
|
||||
function hasPermission(roles, route, parentsRoles) {
|
||||
setHonePagePath(route, roles);
|
||||
if (!getSessionStorage('project')) {
|
||||
return false;
|
||||
}
|
||||
if (route.meta && route.meta.roles) {
|
||||
// 如果存在本级路由,则使用自己的roles过滤
|
||||
if (getSessionStorage('project').startsWith('design')) {
|
||||
const result = roles.filter(role => route.meta.roles.indexOf(role) >= 0) || [];
|
||||
return result.length && route.meta.roles.indexOf(userTrainingPlatform) < 0;
|
||||
} else if (getSessionStorage('project').startsWith('refereeJsxt')) {
|
||||
const result = roles.filter(role => route.meta.roles.indexOf(role) >= 0) || [];
|
||||
return result.length && route.meta.roles.indexOf(refereePlatform) >= 0;
|
||||
} else {
|
||||
roles = roles.filter(function (role) {
|
||||
return route.meta.roles.indexOf(role) >= 0;
|
||||
});
|
||||
return roles.some(role => route.meta.roles.indexOf(role) >= 0) && route.meta.roles.indexOf(userTrainingPlatform) > 0;
|
||||
return roles.some(role => route.meta.roles.indexOf(role) >= 0) && route.meta.roles.indexOf(userTrainingPlatform) >= 0;
|
||||
}
|
||||
} else if (parentsRoles) {
|
||||
// 如果没有本级路由,有父级路由,则使用父级路由过滤
|
||||
@ -104,8 +110,14 @@ const permission = {
|
||||
if (roles.indexOf(superAdmin) >= 0 && roles.indexOf(admin) < 0) {
|
||||
roles.push(admin);
|
||||
}
|
||||
|
||||
const accessedRouters = filterAsyncRouter(asyncRouter, roles);
|
||||
const proRoute = projectRoute[getSessionStorage('project')];
|
||||
let routeArr = [];
|
||||
if (proRoute && proRoute.constructor === Array) {
|
||||
routeArr = [...asyncRouter, ...JSXT, ...proRoute];
|
||||
} else {
|
||||
routeArr = [...asyncRouter, ...JSXT];
|
||||
}
|
||||
const accessedRouters = filterAsyncRouter(routeArr, roles);
|
||||
accessedRouters.forEach(route => {
|
||||
if (route.children && route.children.length == 0) {
|
||||
route.hidden = true;
|
||||
|
@ -29,6 +29,9 @@ function handle(state, data) {
|
||||
case 'Simulation_Script_Tip': // 仿真-聊天界面用户进出仿真消息
|
||||
handleSimulationScriptTipInfo(state, msg); // 用户进出仿真消息
|
||||
break;
|
||||
case 'Simulation_Script_Finish': // 剧本执行完成推送消息
|
||||
state.scriptFinish++; // 剧本执行完成推送消息
|
||||
break;
|
||||
case 'Simulation_RunFact': // 仿真-列车实际到发车站消息
|
||||
// let runFactMsg = msg;
|
||||
// if (runFactMsg.constructor !== Array ) {
|
||||
@ -195,6 +198,7 @@ const socket = {
|
||||
roleList: [], // 设置角色信息
|
||||
simulationRoleList:[], // 设置仿真的聊天角色信息
|
||||
simulationScriptTip:{}, // 剧本推送提示信息
|
||||
scriptFinish:0, // 剧本执行完成提示信息
|
||||
jointRoomPrepare: false, // 演练房间准备状态
|
||||
equipmentStatus: [], // 仿真-设备状态消息
|
||||
trainStationList: [], // 仿真-列车实际到发车站消息
|
||||
|
@ -192,8 +192,8 @@ const training = {
|
||||
setOperate: (state, operate) => {
|
||||
state.operate = operate;
|
||||
},
|
||||
setInitTime: (state, operate) => {
|
||||
state.initTime = operate;
|
||||
setInitTime: (state, initTime) => {
|
||||
state.initTime = initTime;
|
||||
},
|
||||
setPrdType: (state, prdType) => {
|
||||
state.prdType = prdType;
|
||||
|
@ -3,7 +3,7 @@ import { login, logout, getInfo } from '@/api/login';
|
||||
import { getToken, setToken, removeToken } from '@/utils/auth';
|
||||
import { getUserConfigInfo } from '@/api/management/user';
|
||||
import { LoginParams } from '@/utils/login';
|
||||
import { creatSubscribe, clearSubscribe, perpetualTopic, commonTopic, disconnect} from '@/utils/stomp';
|
||||
import { creatSubscribe, clearSubscribe, perpetualTopic, disconnect} from '@/utils/stomp';
|
||||
import Cookies from 'js-cookie';
|
||||
|
||||
const user = {
|
||||
|
@ -2,12 +2,12 @@ export function getBaseUrl() {
|
||||
let BASE_API;
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
// BASE_API = 'https://joylink.club/jlcloud';
|
||||
// BASE_API = 'https://test.joylink.club/jlcloud';
|
||||
BASE_API = 'https://test.joylink.club/jlcloud';
|
||||
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪
|
||||
BASE_API = 'http://192.168.3.6:9000'; // 旭强
|
||||
// BASE_API = 'http://192.168.3.6:9000'; // 旭强
|
||||
// BASE_API = 'http://192.168.3.41:9000'; // 张赛
|
||||
// BASE_API = 'http://192.168.3.82:9000'; // 杜康
|
||||
// BASE_API = 'http://192.168.3.41:9000'; // 张S赛
|
||||
// BASE_API = 'http://192.168.3.41:9000'; // 张赛
|
||||
// BASE_API = 'http://b29z135112.zicp.vip';
|
||||
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
|
||||
// BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛
|
||||
|
@ -149,9 +149,9 @@ export function deepAssign(obj, item) {
|
||||
const target = item.constructor === Array ? [] : {}; // 判断复制的目标是数组还是对象
|
||||
for (const keys in item) {
|
||||
if (item.hasOwnProperty(keys) && keys != 'instance') { // instance 对面不拷贝
|
||||
if (item[keys] && typeof item[keys] === 'object') { // 如果值是对象,就递归一下
|
||||
target[keys] = item[keys].constructor === Array ? [] : {};
|
||||
target[keys] = deepClone(item[keys]);
|
||||
if (item[keys] && typeof item[keys] == 'object') { // 如果值是对象,就递归一下
|
||||
const targetObj = item[keys].constructor == Array ? [] : {};
|
||||
target[keys] = deepAssign(targetObj, item[keys]);
|
||||
} else {
|
||||
target[keys] = item[keys];
|
||||
}
|
||||
|
@ -1,27 +1,27 @@
|
||||
<template>
|
||||
<div class="errPage-container">
|
||||
<el-button icon="arrow-left" class="pan-back-btn" @click="back">
|
||||
{{$t('global.back')}}
|
||||
{{ $t('global.back') }}
|
||||
</el-button>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<h1 class="text-jumbo text-ginormous">
|
||||
Oops!
|
||||
</h1>
|
||||
{{$t('error.gifSource')}}<a href="https://zh.airbnb.com/" target="_blank">airbnb</a> {{$t('error.page')}}
|
||||
<h2>{{$t('error.noPermissionToGoToThisPage')}}</h2>
|
||||
<h6>{{$t('error.dissatisfied')}}</h6>
|
||||
{{ $t('error.gifSource') }}<a href="https://zh.airbnb.com/" target="_blank">airbnb</a> {{ $t('error.page') }}
|
||||
<h2>{{ $t('error.noPermissionToGoToThisPage') }}</h2>
|
||||
<h6>{{ $t('error.dissatisfied') }}</h6>
|
||||
<ul class="list-unstyled">
|
||||
<li>{{$t('error.orYouCanGo')}}</li>
|
||||
<li>{{ $t('error.orYouCanGo') }}</li>
|
||||
<li class="link-type">
|
||||
<router-link to="/dashboard">
|
||||
{{$t('error.backToHome')}}
|
||||
{{ $t('error.backToHome') }}
|
||||
</router-link>
|
||||
</li>
|
||||
<li class="link-type">
|
||||
<a href="https://www.taobao.com/">{{$t('error.justLookingAround')}}</a>
|
||||
<a href="https://www.taobao.com/">{{ $t('error.justLookingAround') }}</a>
|
||||
</li>
|
||||
<li><a href="#" @click.prevent="dialogVisible=true">{{$t('error.pointMeToSeeThePicture')}}</a></li>
|
||||
<li><a href="#" @click.prevent="dialogVisible=true">{{ $t('error.pointMeToSeeThePicture') }}</a></li>
|
||||
</ul>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
@ -35,27 +35,27 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import errGif from '@/assets/401_images/401.gif'
|
||||
import errGif from '@/assets/401_images/401.gif';
|
||||
|
||||
export default {
|
||||
name: 'Page401',
|
||||
data() {
|
||||
return {
|
||||
errGif: errGif + '?' + +new Date(),
|
||||
ewizardClap: 'https://wpimg.wallstcn.com/007ef517-bafd-4066-aae4-6883632d9646',
|
||||
dialogVisible: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
back() {
|
||||
if (this.$route.query.noGoBack) {
|
||||
this.$router.push({ path: '/dashboard' })
|
||||
} else {
|
||||
this.$router.go(-1)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
name: 'Page401',
|
||||
data() {
|
||||
return {
|
||||
errGif: errGif + '?' + +new Date(),
|
||||
ewizardClap: 'https://wpimg.wallstcn.com/007ef517-bafd-4066-aae4-6883632d9646',
|
||||
dialogVisible: false
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
back() {
|
||||
if (this.$route.query.noGoBack) {
|
||||
this.$router.push({ path: '/dashboard' });
|
||||
} else {
|
||||
this.$router.go(-1);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
@ -1,11 +1,11 @@
|
||||
<template>
|
||||
<div class="iscs_lcd_box" style="width: 100%;height: 100%; position: relative;">
|
||||
<div class="lcdControl_title">LCD控制屏</div>
|
||||
<div class="area_select" style="position: absolute; top: 15%; left: 25%; width: 80px; height: 50px;">
|
||||
<div>特定区域</div>
|
||||
<div>全线</div>
|
||||
<div class="area_select">
|
||||
<div class="area_select_title">特定区域</div>
|
||||
<div class="area_select_button">全线</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="area_select" style="top: 27%;">
|
||||
<div>
|
||||
<el-radio v-model="lcdSwitch" :label="true" border>开启LCD屏</el-radio>
|
||||
<el-radio v-model="lcdSwitch" :label="false" border>关闭LCD屏</el-radio>
|
||||
@ -39,6 +39,33 @@ export default {
|
||||
color: #56E5DE;
|
||||
}
|
||||
.area_select {
|
||||
|
||||
position: absolute;
|
||||
top: 15%;
|
||||
left: 25%;
|
||||
width: 120px;
|
||||
/*height: 70px;*/
|
||||
border-top: 3px solid #898888;
|
||||
border-left: 3px solid #898888;
|
||||
border-right: 3px solid #fff;
|
||||
border-bottom: 3px solid #fff;
|
||||
padding-top: 5px;
|
||||
text-align: center;
|
||||
}
|
||||
.area_select_title {
|
||||
color: #56E5DE;
|
||||
font-size: 12px;
|
||||
}
|
||||
.area_select_button {
|
||||
text-align: center;
|
||||
width: 80px;
|
||||
height: 30px;
|
||||
background: #A9A9A9;
|
||||
border-top: 2px solid #FFF;
|
||||
border-left: 2px solid #FFF;
|
||||
border-right: 2px solid #898888;
|
||||
border-bottom: 2px solid #898888;
|
||||
margin: 5px 18px 10px;
|
||||
font-size: 14px;
|
||||
line-height: 30px;
|
||||
}
|
||||
</style>
|
||||
|
@ -119,8 +119,9 @@
|
||||
}else{
|
||||
this.datastatus = "new";
|
||||
this.initnewdata(group,header);
|
||||
|
||||
}
|
||||
// const mapdata = this.$store.getters['map/map'];
|
||||
// console.log(mapdata);
|
||||
// if (group) {
|
||||
// this.init(group,header);
|
||||
// // this.subscribe(code,group,header);
|
||||
|
259
src/views/jlmap3d/maintainer/jl3dmaintainer.vue
Normal file
259
src/views/jlmap3d/maintainer/jl3dmaintainer.vue
Normal file
@ -0,0 +1,259 @@
|
||||
<template>
|
||||
|
||||
<div class="jalmap3ddiv">
|
||||
|
||||
<div class="display-draft">
|
||||
<el-button-group>
|
||||
|
||||
<el-button type="primary" @click="back">{{ $t('global.back') }}</el-button>
|
||||
</el-button-group>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- <Jlmap3d-Menu :trainlist="trainlist" :stationlist="stationlist" @sstation="sstation" @strain="strain" />
|
||||
|
||||
<Jlmap3d-Config @showstationmsg="showstationmsg" @showtrainmsg="showtrainmsg" /> -->
|
||||
|
||||
<!-- <Jlmap3d-Msg v-bind:msgdata="msgdata" >
|
||||
</Jlmap3d-Msg > -->
|
||||
|
||||
<div id="testjlmap3d" class="jlmap3ddraw">
|
||||
<canvas id="canvastexture" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import Vue from 'vue';
|
||||
// import localStore from 'storejs';
|
||||
// import { mapGetters } from 'vuex';
|
||||
//
|
||||
// // import ShowProperty from '@/views/jlmap3d/show/property';
|
||||
//
|
||||
// import { simulationNotify, setTrainingCbtcInitTime } from '@/api/simulation';
|
||||
//
|
||||
// import { UrlConfig } from '@/router/index';
|
||||
|
||||
import { JLmap3dMaintainer } from '@/jlmap3d/jl3dmaintainer/jlmap3dmaintainer.js';
|
||||
|
||||
// components
|
||||
import Jlmap3dMenu from '@/views/jlmap3d/simulation/show/menu';
|
||||
|
||||
import Jlmap3dConfig from '@/views/jlmap3d/simulation/show/configmenu';
|
||||
import { ProjectIcon } from '@/scripts/ProjectConfig';
|
||||
|
||||
// import Jlmap3dMsg from '@/views/jlmap3d/show/msg';
|
||||
|
||||
var train;
|
||||
export default {
|
||||
name: 'Jl3dMaintainer',
|
||||
components: {
|
||||
Jlmap3dMenu,
|
||||
Jlmap3dConfig
|
||||
// Jlmap3dMsg
|
||||
// ShowProperty
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
trainlist: null,
|
||||
stationlist: null,
|
||||
msgdata: null,
|
||||
|
||||
training: {
|
||||
id: '',
|
||||
name: '',
|
||||
remarks: ''
|
||||
},
|
||||
|
||||
mapdata: null,
|
||||
jlmap3d: null,
|
||||
selectmodel: null,
|
||||
mapid:null,
|
||||
group:null,
|
||||
token:null
|
||||
};
|
||||
},
|
||||
beforeDestroy() {
|
||||
// console.log("destroy");
|
||||
if (this.jlmap3d) {
|
||||
this.jlmap3d.webwork.postMessage('off');
|
||||
this.jlmap3d.webwork.terminate();
|
||||
this.jlmap3d.jsonwebwork.terminate();
|
||||
this.jlmap3d.dispose();
|
||||
this.jlmap3d = null;
|
||||
// this.$destroy();
|
||||
}
|
||||
},
|
||||
created() {
|
||||
document.querySelector("link[rel*='icon']").href = ProjectIcon[this.$route.query.project];
|
||||
},
|
||||
mounted() {
|
||||
window.updatemenulist = this.updatemenulist;
|
||||
this.getParams();
|
||||
|
||||
// console.log("");
|
||||
},
|
||||
methods: {
|
||||
getParams:function() {
|
||||
var routerParams = this.$route.query.group;
|
||||
this.mapid = this.$route.query.mapId;
|
||||
this.group = this.$route.query.group;
|
||||
this.token = this.$route.query.token;
|
||||
console.log(this.mapid);
|
||||
console.log(this.group);
|
||||
console.log(this.token);
|
||||
this.init(this.mapid, this.group);
|
||||
},
|
||||
show: function (skinCode, group) {
|
||||
if (this.jlmap3d == null) {
|
||||
this.init(skinCode, group);
|
||||
} else {
|
||||
// this.jlmap3d.restart();
|
||||
this.jlmap3d.eventon();
|
||||
this.jlmap3d.animateon();
|
||||
|
||||
}
|
||||
},
|
||||
init: function (skinCode, group) {
|
||||
const mapdata = this.$store.getters['map/map'];
|
||||
const dom = document.getElementById('app');
|
||||
const project = this.$route.query.project;
|
||||
// console.log(project);
|
||||
|
||||
if (project) {
|
||||
|
||||
this.jlmap3d = new JLmap3dMaintainer(dom, mapdata, skinCode, this.$store, group, project);
|
||||
} else {
|
||||
|
||||
this.jlmap3d = new JLmap3dMaintainer(dom, mapdata, skinCode, this.$store, group, '');
|
||||
}
|
||||
this.jlmap3d.eventon();
|
||||
},
|
||||
raystand() {
|
||||
this.jlmap3d.rayswitch('stand');
|
||||
},
|
||||
raytrain() {
|
||||
this.jlmap3d.rayswitch('train');
|
||||
},
|
||||
raysection() {
|
||||
this.jlmap3d.rayswitch('section');
|
||||
},
|
||||
raysignal() {
|
||||
this.jlmap3d.rayswitch('signal');
|
||||
},
|
||||
rayswitch() {
|
||||
this.jlmap3d.rayswitch('switch');
|
||||
},
|
||||
railmove() {
|
||||
this.jlmap3d.camerarailmove();
|
||||
},
|
||||
showstationmsg(showtype) {
|
||||
this.jlmap3d.showstationmsg(showtype);
|
||||
},
|
||||
showtrainmsg(showtype) {
|
||||
this.jlmap3d.showtrainmsg(showtype);
|
||||
},
|
||||
updatemenulist(stationlist, trainlist) {
|
||||
const stations = [];
|
||||
for (const k in stationlist) {
|
||||
stations.push(stationlist[k]);
|
||||
}
|
||||
const trains = [];
|
||||
for (const k in trainlist) {
|
||||
trains.push(trainlist[k]);
|
||||
}
|
||||
this.stationlist = stations;
|
||||
this.trainlist = trains;
|
||||
// console.log(this.stationlist);
|
||||
},
|
||||
|
||||
sstation(changedata) {
|
||||
this.jlmap3d.updatecamera(changedata.mesh, 'station');
|
||||
},
|
||||
strain(changedata) {
|
||||
|
||||
if (changedata.dispose == false) {
|
||||
this.jlmap3d.updatecamera(changedata, 'train');
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
back() {
|
||||
this.$emit('back');
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
|
||||
.display-card {
|
||||
z-index: 9;
|
||||
display: inline;
|
||||
position: absolute;
|
||||
top: 17px;
|
||||
float: left;
|
||||
left: 160px;
|
||||
height: 32px;
|
||||
}
|
||||
|
||||
.display-card .el-row {
|
||||
line-height: 32px !important;
|
||||
}
|
||||
|
||||
.display-score {
|
||||
background-color: black;
|
||||
display: -moz-inline-box;
|
||||
display: inline-block;
|
||||
text-align: left;
|
||||
/* border: 1px solid lightskyblue; */
|
||||
/* width: 100px; */
|
||||
height: 32px;
|
||||
line-height: 24px;
|
||||
border-radius: 4px;
|
||||
padding-left: 2px;
|
||||
margin-left: 10px;
|
||||
font-family: "Microsoft" !important;
|
||||
font-size: 18px !important;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.display-draft {
|
||||
/* z-index: 1000; */
|
||||
position: absolute;
|
||||
float: right;
|
||||
right: 40px;
|
||||
bottom: 28px;
|
||||
}
|
||||
|
||||
#testjlmap3d {
|
||||
}
|
||||
|
||||
.jalmap3ddiv {
|
||||
position:absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 30;
|
||||
}
|
||||
|
||||
.jlmap3ddraw {
|
||||
float: left;
|
||||
left: 0;
|
||||
//left:20%;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position:absolute;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
#canvastexture {
|
||||
position: absolute;
|
||||
float: left;
|
||||
left: 0;
|
||||
z-index: -12;
|
||||
}
|
||||
</style>
|
420
src/views/jsxt/apply/index.vue
Normal file
420
src/views/jsxt/apply/index.vue
Normal file
@ -0,0 +1,420 @@
|
||||
<template>
|
||||
<div class="dictionary_box">
|
||||
<h2 style="text-align: center;">报名系统</h2>
|
||||
<div class="joylink-card">
|
||||
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
||||
<span class="dialog-footer" style="margin: 0 auto; display: table;">
|
||||
<el-button type="primary" @click="handleApply">报名</el-button>
|
||||
</span>
|
||||
<el-dialog title="登陆弹窗" custom-class="dialog-apply" :visible.sync="dialogVisible" width="740px" :close-on-press-escape="false" :show-close="false" :close-on-click-modal="false" :modal="true">
|
||||
<div class="content-box">
|
||||
<div class="qrcode-main">
|
||||
<div class="login-code-box" @click="loginRefresh">
|
||||
<qrcode-vue
|
||||
v-loading="loadingCode"
|
||||
:value="loginUrl"
|
||||
:class-name="qrcodeClassName"
|
||||
:size="150"
|
||||
:element-loading-text="this.$t('login.clickRefresh')"
|
||||
element-loading-spinner="el-icon-refresh"
|
||||
element-loading-background="rgba(255, 255, 255, 0.9)"
|
||||
/>
|
||||
</div>
|
||||
<div class="login-tip">
|
||||
<span class="sub-title">使用手机微信扫码登录</span>
|
||||
</div>
|
||||
</div>
|
||||
<el-form ref="loginForm" class="login-form" :model="loginForm" :rules="loginRules" label-position="left">
|
||||
<el-form-item prop="username" class="item_form_box">
|
||||
<span class="svg-container svg-container_login"><svg-icon icon-class="user" /></span>
|
||||
<el-input v-model="loginForm.username" name="username" type="text" :placeholder="this.$t('login.mobilePhoneNumberOrEmail')" @keyup.enter.native="goToNext" />
|
||||
</el-form-item>
|
||||
<el-form-item prop="password" class="item_form_box item_form_password">
|
||||
<span class="svg-container"><svg-icon icon-class="password" /></span>
|
||||
<el-input
|
||||
ref="password"
|
||||
v-model="loginForm.password"
|
||||
name="password"
|
||||
:type="pwdType"
|
||||
:placeholder="this.$t('login.password')"
|
||||
@keyup.enter.native="handleLogin"
|
||||
/>
|
||||
<span class="show-pwd" @click="showPwd">
|
||||
<svg-icon v-if="pwdDisplay" icon-class="eye" />
|
||||
<svg-icon v-else icon-class="eye-open" />
|
||||
</span>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" style="width:100%;" :loading="loading" @click.native.prevent="handleLogin">登陆</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getToken } from '@/utils/auth';
|
||||
import { getLoginWmurl, checkLoginStatus } from '@/api/login';
|
||||
import { LoginParams } from '@/utils/login';
|
||||
import md5 from 'js-md5';
|
||||
import Cookies from 'js-cookie';
|
||||
import QrcodeVue from 'qrcode.vue';
|
||||
|
||||
export default {
|
||||
name: '',
|
||||
components: { QrcodeVue },
|
||||
data() {
|
||||
const validateUsername = (rule, value, callback) => {
|
||||
if (value.length < 5 && !this.project.endsWith('gzb')) {
|
||||
callback(new Error(this.$t('login.enterTheCorrectUserName')));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
const validatePass = (rule, value, callback) => {
|
||||
if (value.length < 5) {
|
||||
callback(new Error(this.$t('login.passwordHint')));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
return {
|
||||
dialogVisible: false,
|
||||
loginClient: 'Design',
|
||||
checkLogin: null,
|
||||
sessionId: '',
|
||||
userId: '',
|
||||
loading: false,
|
||||
loadingCode: false,
|
||||
pwdDisplay: true,
|
||||
loginUrl: '',
|
||||
pwdType: 'password',
|
||||
qrcodeClassName: 'login-qrcode',
|
||||
cookiesName: 'UserName',
|
||||
cookiesToken: 'UserToken',
|
||||
loginForm: {
|
||||
username: '',
|
||||
password: ''
|
||||
},
|
||||
loginRules: {
|
||||
username: [{ required: true, trigger: 'blur', validator: validateUsername }],
|
||||
password: [{ required: true, trigger: 'blur', validator: validatePass }]
|
||||
},
|
||||
formModel: {
|
||||
name: '',
|
||||
numberId: '',
|
||||
company: '', // 公司
|
||||
job: '', // 职位
|
||||
department: '', // 部门
|
||||
phone: '' // 电话
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
form() {
|
||||
const form = {
|
||||
labelWidth: '100px',
|
||||
items: [
|
||||
{ prop: 'name', label: '名字', type: 'text' },
|
||||
{ prop: 'numberId', label: '身份证号', type: 'text' },
|
||||
{ prop: 'phone', label: '电话', type: 'text' },
|
||||
{ prop: 'company', label: '公司', type: 'text' },
|
||||
{ prop: 'department', label: '部门', type: 'text' },
|
||||
{ prop: 'job', label: '职位', type: 'text' }
|
||||
]
|
||||
};
|
||||
return form;
|
||||
},
|
||||
rules() {
|
||||
var validatePhone = (rule, value, callback) => {
|
||||
const myreg = /^(((13[0-9]{1})|(15[0-9]{1})|(17[0-9]{1})|(18[0-9]{1}))+\d{8})$/;
|
||||
if (myreg.test(value)) {
|
||||
callback();
|
||||
} else {
|
||||
callback(new Error('电话号码格式不正确'));
|
||||
}
|
||||
};
|
||||
return {
|
||||
name: [
|
||||
{ required: true, message: '请填写名字', trigger: 'blur' }
|
||||
],
|
||||
numberId: [
|
||||
{ required: true, message: '请填写身份证号', trigger: 'blur' },
|
||||
{ validator: this.validateNumberId, trigger: 'blur' }
|
||||
],
|
||||
phone:[
|
||||
{ required: true, message: '请填写电话', trigger: 'blur' },
|
||||
{ validator: validatePhone, trigger: 'blur' }
|
||||
],
|
||||
company:[
|
||||
{ required: true, message: '请填写公司名称', trigger: 'blur' }
|
||||
],
|
||||
job:[
|
||||
{ required: true, message: '请填写职位', trigger: 'blur' }
|
||||
],
|
||||
department: [
|
||||
{ required: true, message: '请填写部门', trigger: 'blur' }
|
||||
]
|
||||
};
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getUserInfo();
|
||||
},
|
||||
methods: {
|
||||
getUserInfo() {
|
||||
if (getToken()) {
|
||||
this.$store.dispatch('GetInfo', getToken()).then(res => {
|
||||
this.userId = res.id;
|
||||
console.log(this.userId, '用户id');
|
||||
});
|
||||
} else {
|
||||
this.dialogVisible = true;
|
||||
this.loginRefresh();
|
||||
}
|
||||
},
|
||||
goToNext() {
|
||||
if (this.loginForm.username.length < 5) {
|
||||
return;
|
||||
} else {
|
||||
this.$refs['password'].focus();
|
||||
}
|
||||
},
|
||||
showPwd() {
|
||||
if (this.pwdType === 'password') {
|
||||
this.pwdDisplay = false;
|
||||
this.pwdType = '';
|
||||
} else {
|
||||
this.pwdType = 'password';
|
||||
this.pwdDisplay = true;
|
||||
}
|
||||
},
|
||||
handleLogin() {
|
||||
this.$refs.loginForm.validate(valid => {
|
||||
if (valid) {
|
||||
const model = Object.assign({}, this.loginForm);
|
||||
model.password = md5(model.password);
|
||||
model.type = this.modelType;
|
||||
this.loading = true;
|
||||
if (this.isAutoLogin) {
|
||||
Cookies.set(this.cookiesName, model.username, { expires: 2});
|
||||
Cookies.set(this.cookiesToken, model.password, { expires: 2});
|
||||
}
|
||||
this.$store.dispatch('Login', model).then(() => {
|
||||
this.getUserInfo();
|
||||
}).catch(error => {
|
||||
if (error.code === '30001') {
|
||||
this.tipsMsg = this.$t('login.accountOrPasswordIsIncorrect');
|
||||
} else {
|
||||
this.tipsMsg = error.message;
|
||||
}
|
||||
this.loading = false;
|
||||
setTimeout(() => { this.tipsMsg = ''; }, 5000);
|
||||
});
|
||||
this.dialogVisible = false;
|
||||
} else {
|
||||
console.log('error submit!!');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
loginRefresh() {
|
||||
this.loadingCode = true;
|
||||
getLoginWmurl(LoginParams[this.loginClient]).then(response => {
|
||||
this.sessionId = response.data.sessionId;
|
||||
this.loginUrl = response.data.url;
|
||||
this.loadingCode = false;
|
||||
this.checkLoginStatus();
|
||||
}).catch((error) => {
|
||||
console.log(error);
|
||||
this.loadingCode = false;
|
||||
this.$messageBox(this.$t('login.getLoginQrCode'));
|
||||
});
|
||||
},
|
||||
checkLoginStatus() {
|
||||
// 销毁则不再定时
|
||||
if (this && this._isDestroyed) {
|
||||
return;
|
||||
}
|
||||
// 清空已存在的定时器
|
||||
// 设置定时器检测
|
||||
this.clearTimer(this.checkLogin);
|
||||
this.checkLogin = setTimeout(() => {
|
||||
checkLoginStatus(this.sessionId).then(response => {
|
||||
// 设置扫码登录
|
||||
this.$store.dispatch('QrLoginSetting', { key: 'SET_TOKEN', value: response.data.token, type: this.modelType }).then(() => {
|
||||
// 清除定时器,设置路由
|
||||
this.clearTimer(this.checkLogin);
|
||||
this.getUserInfo();
|
||||
});
|
||||
}).catch(() => {
|
||||
this.checkLoginStatus();
|
||||
});
|
||||
}, 3000);
|
||||
},
|
||||
clearTimer(timer) {
|
||||
if (timer) {
|
||||
clearTimeout(timer);
|
||||
timer = null;
|
||||
}
|
||||
},
|
||||
handleApply() {
|
||||
this.$refs.dataform.validateForm(() => {
|
||||
console.log(this.formModel, '内容');
|
||||
});
|
||||
},
|
||||
validateNumberId(rule, value, callback) {
|
||||
var regIdCard = /^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[Xx])$)$/; // 如果通过该验证,说明身份证格式正确,但准确性还需计算
|
||||
if (regIdCard.test(value)) {
|
||||
if (value.length == 18) {
|
||||
var idCardWi = [7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2]; // 将前17位加权因子保存在数组里
|
||||
var idCardY = [1, 0, 10, 9, 8, 7, 6, 5, 4, 3, 2]; // 这是除以11后,可能产生的11位余数、验证码,也保存成数组
|
||||
var idCardWiSum = 0; // 用来保存前17位各自乖以加权因子后的总和
|
||||
for (var i = 0; i < 17; i++) {
|
||||
idCardWiSum += value.substring(i, i + 1) * idCardWi[i];
|
||||
}
|
||||
var idCardMod = idCardWiSum % 11;// 计算出校验码所在数组的位置
|
||||
var idCardLast = value.substring(17);// 得到最后一位身份证号码
|
||||
// 如果等于2,则说明校验码是10,身份证号码最后一位应该是X
|
||||
if (idCardMod == 2) {
|
||||
if (idCardLast == 'X' || idCardLast == 'x') {
|
||||
callback();
|
||||
} else {
|
||||
callback(new Error('身份证号码错误'));
|
||||
}
|
||||
} else {
|
||||
// 用计算出的验证码与最后一位身份证号码匹配,如果一致,说明通过,否则是无效的身份证号码
|
||||
if (idCardLast == idCardY[idCardMod]) {
|
||||
callback();
|
||||
} else {
|
||||
callback(new Error('身份证号码错误'));
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
callback(new Error('身份证格式不正确'));
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
$bg:#f0f0f0;
|
||||
$qrbg:#fff;
|
||||
$dark_gray:#889aa4;
|
||||
$light_gray:#eee;
|
||||
$qrcodeSize: 270px;
|
||||
.dictionary_box{
|
||||
padding-top: 10px;
|
||||
.joylink-card{
|
||||
width: 800px;
|
||||
margin: 0 auto 20px;
|
||||
padding: 24px;
|
||||
border: 1px solid #EBEEF5;
|
||||
background-color: #FFF;
|
||||
color: #303133;
|
||||
transition: .3s;
|
||||
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
}
|
||||
/deep/{
|
||||
.dialog-apply{
|
||||
.el-form-item{
|
||||
background: #fff !important;
|
||||
border: 1px solid rgba(0, 0, 0, 0.1) !important;
|
||||
.el-input {
|
||||
height: 40px;
|
||||
width: 85%;
|
||||
background: #fff;
|
||||
input {
|
||||
background: #fff !important;
|
||||
border: 0px;
|
||||
-webkit-appearance: none;
|
||||
border-radius: 0px;
|
||||
padding: 8px 9px 7px 5px;
|
||||
color: #000;
|
||||
height: 100%;
|
||||
|
||||
&:-webkit-autofill {
|
||||
box-shadow: 0 0 0px 1000px #fff inset !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.login-form {
|
||||
width: 440px;
|
||||
padding: 0 50px;
|
||||
}
|
||||
.content-box{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: #fff;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.item_form_box {
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 5px;
|
||||
color: #454545;
|
||||
padding: 0px 10px;
|
||||
}
|
||||
|
||||
.item_form_password{
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.tip-message {
|
||||
color: #F56C61;
|
||||
padding: 5px;
|
||||
font-size: 12px;
|
||||
height: 23px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.popover_box {
|
||||
position: absolute;
|
||||
right: 80px;
|
||||
bottom: 106px;
|
||||
cursor: pointer;
|
||||
color: #225592;
|
||||
font-size: 14px;
|
||||
}
|
||||
.qrcode-main{
|
||||
width: 300px;
|
||||
background-color: $qrbg;
|
||||
text-align: center;
|
||||
border-right: 1px solid #ececec;
|
||||
.tip-info {
|
||||
text-align: left;
|
||||
display: inline-block;
|
||||
color: green;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.login-code-box{
|
||||
width: 150px;
|
||||
margin: 0 auto;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.system-type {
|
||||
margin: 5px 0;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.sub-title {
|
||||
font-size: 16px;
|
||||
text-align: center;
|
||||
color: #353535;
|
||||
line-height: 30px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
@ -15,13 +15,10 @@
|
||||
:filter-node-method="filterNode"
|
||||
:default-expanded-keys="expandList"
|
||||
@node-click="clickEvent"
|
||||
@node-expand="nodeExpand"
|
||||
@node-collapse="nodeCollapse"
|
||||
>
|
||||
<span slot-scope="{ node }">
|
||||
<span class="el-icon-tickets" />
|
||||
<span v-if="node.data.id ==='Simulation'"> 仿真系统</span>
|
||||
<span v-else> {{ node.data.name }}</span>
|
||||
<span> {{ node.data.name }}</span>
|
||||
</span>
|
||||
</el-tree>
|
||||
</div>
|
||||
@ -29,7 +26,6 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import localStore from 'storejs';
|
||||
import { getSessionStorage } from '@/utils/auth';
|
||||
|
||||
export default {
|
||||
@ -37,14 +33,18 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
treeList: [],
|
||||
treeList: [
|
||||
{name: '西安考试地图', id: '13', type: 'Map', children: [
|
||||
{name: '理论竞赛', type: 'theory'},
|
||||
{name: '实操竞赛', type: 'operation'}
|
||||
]}
|
||||
],
|
||||
defaultProps: {
|
||||
children: 'children',
|
||||
label: 'name'
|
||||
},
|
||||
mapId: '',
|
||||
expandList: [],
|
||||
filterSelect: ''
|
||||
expandList: []
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -68,29 +68,16 @@ export default {
|
||||
return data.name.indexOf(value) !== -1;
|
||||
},
|
||||
clickEvent(obj, data, ele) {
|
||||
localStore.set('trainingPlatformCheckId' + this.filterSelect + this.userId, obj.id);
|
||||
while (data) {
|
||||
if (data.data.type === 'Map') {
|
||||
this.mapId = data.data.id;
|
||||
break;
|
||||
}
|
||||
data = data.parent;
|
||||
if (obj.type === 'Map') {
|
||||
this.mapId = obj.id;
|
||||
this.$router.push({ path: `/jsxt/home`});
|
||||
} else if (obj.type === 'theory') {
|
||||
const query = {type: 'theory', mapId: this.mapId};
|
||||
this.$router.push({path: `/jsxt/examDetail`, query: query});
|
||||
} else if (obj.type === 'operation') {
|
||||
const query = {type: 'operation', mapId: this.mapId};
|
||||
this.$router.push({path: `/jsxt/examDetail`, query: query});
|
||||
}
|
||||
console.log(obj, data, ele);
|
||||
},
|
||||
setLocalRoute(path) {
|
||||
localStore.set('trainingPlatformRoute' + this.userId, path);
|
||||
},
|
||||
nodeExpand(obj, node, ele) {
|
||||
const key = obj.id + obj.type;
|
||||
this.expandList = this.expandList.filter(item => item !== key);
|
||||
this.expandList.push(key);
|
||||
localStore.set('trainIngPlatformExpandList' + this.filterSelect + this.userId, this.expandList);
|
||||
},
|
||||
nodeCollapse(obj, node, ele) {
|
||||
const key = obj.id + obj.type;
|
||||
this.expandList = this.expandList.filter(item => item !== key);
|
||||
localStore.set('trainIngPlatformExpandList' + this.filterSelect + this.userId, this.expandList);
|
||||
}
|
||||
}
|
||||
};
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user