Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
7bacd3c49f
@ -569,6 +569,12 @@ export default {
|
||||
signalSectionSuccessful: 'Signal close section created successfully!',
|
||||
signalSectionUpdateSucceeded: 'Update signal close to section successful!',
|
||||
|
||||
crossCoding:'Cross code',
|
||||
crossName:'Cross name',
|
||||
relateSwitchList:'Related switchList',
|
||||
cross:'cross',
|
||||
generateCross:'generate cross',
|
||||
|
||||
belongsSection: 'Belongs section:',
|
||||
coordinateMode: 'Coordinate mode',
|
||||
sectionAssociationMode: 'Section association mode',
|
||||
|
@ -25,6 +25,10 @@ export default {
|
||||
linkSelectName: 'Enter the Link name',
|
||||
linkSelectDisplayLength: 'Please enter the actual length of the Link',
|
||||
|
||||
pleaseSelectCross:'Please select cross',
|
||||
pleaseInputCrossName:'Please input cross name',
|
||||
pleaseSelectSwitch:'Please select switch',
|
||||
|
||||
lengthShow: 'According to the length of the:',
|
||||
lengthFact: 'The real length:',
|
||||
color: 'color:',
|
||||
|
@ -563,6 +563,12 @@ export default {
|
||||
interlockingBlocks: '联锁区段',
|
||||
alwaysRed: '是否总是显示红灯',
|
||||
|
||||
crossCoding:'岔心编号',
|
||||
crossName:'岔心名称',
|
||||
relateSwitchList:'关联道岔',
|
||||
cross:'岔心',
|
||||
generateCross:'一键生成岔心',
|
||||
|
||||
belongsSection: '所属区段:',
|
||||
coordinateMode: '坐标方式',
|
||||
sectionAssociationMode: '区段关联方式',
|
||||
|
@ -24,6 +24,10 @@ export default {
|
||||
linkSelectName: '请输入Link名称',
|
||||
linkSelectDisplayLength: '请输入Link实际长度',
|
||||
|
||||
pleaseSelectCross:'请选择岔心',
|
||||
pleaseInputCrossName:'请输入岔心名称',
|
||||
pleaseSelectSwitch:'请选择道岔',
|
||||
|
||||
lengthShow: '显示长度:',
|
||||
lengthFact: '真实长度:',
|
||||
color: '颜色:',
|
||||
|
@ -161,7 +161,7 @@ export function JLmapDriving(dom,data,mapId,storemod,translation,routegroup,proj
|
||||
driverWebWorker = new Worker(JL3D_LOCAL_STATIC+"/workertest/driverWebWorker.js");
|
||||
scope.Subscribe = new Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,driverWebWorker,stats);
|
||||
|
||||
datanew();
|
||||
// datanew();
|
||||
|
||||
DriverLoadNew(mapnetdata,scope,netdata.data,mapdata,sectionlist,signallist,switchlist,stationstandlist,trainlisttest,rails,camera,controls3,scene,mixers);
|
||||
var timer = setInterval(function() {
|
||||
|
@ -71,7 +71,7 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
|
||||
if(data.type == "Train_Hmi_3D"){
|
||||
|
||||
//改变当前列车code
|
||||
|
||||
// console.log(data);
|
||||
if(data.body.groupNumber){
|
||||
changeNowTrain(data.body);
|
||||
updateDriveValue(data.body.groupNumber);
|
||||
|
@ -9,13 +9,14 @@ import { OrbitControls } from '@/jlmap3d/main/control/OrbitControls';
|
||||
import { dataManager } from '@/jlmap3d/jl3dtrafficplan/sandbox/datamanager';
|
||||
|
||||
|
||||
import StompClient from '@/utils/sock';
|
||||
|
||||
import store from '@/store/index';
|
||||
// import { Loading } from 'element-ui';
|
||||
import {Stats} from '@/jlmap3d/main/lib/stats.min.js';
|
||||
|
||||
export function Jl3dSandBoxTest(dom,skinCode,routegroup,token) {
|
||||
export function Jl3dSandBoxTest(dom,textUi,skinCode,routegroup,token) {
|
||||
let scope = this;
|
||||
|
||||
var camera, scene, renderer,controls, light;
|
||||
|
||||
camera = new THREE.PerspectiveCamera( 45, window.innerWidth / window.innerHeight, 0.001, 50000 );
|
||||
@ -43,9 +44,10 @@ export function Jl3dSandBoxTest(dom,skinCode,routegroup,token) {
|
||||
|
||||
|
||||
|
||||
let manager = new dataManager(scene);
|
||||
let manager = new dataManager(scene,textUi,camera,routegroup);
|
||||
manager.init(skinCode);
|
||||
|
||||
|
||||
animate();
|
||||
//循环渲染函数
|
||||
function animate() {
|
||||
|
@ -7,23 +7,105 @@ import { sectionModel } from '@/jlmap3d/jl3dtrafficplan/sandbox/sectionmodel';
|
||||
import { signalModel } from '@/jlmap3d/jl3dtrafficplan/sandbox/signalmodel';
|
||||
import { stationModel } from '@/jlmap3d/jl3dtrafficplan/sandbox/stationmodel';
|
||||
import { trainModel } from '@/jlmap3d/jl3dtrafficplan/sandbox/trainmodel';
|
||||
import { ModelManager } from '@/jlmap3d/jl3dtrafficplan/sandbox/loader';
|
||||
|
||||
export function dataManager(scene) {
|
||||
import {Materialload} from '@/jlmap3d/main/loaders/Materialload.js';
|
||||
//数据整合
|
||||
import { sandBoxConnect } from '@/jlmap3d/jl3dtrafficplan/sandbox/sandboxconnect';
|
||||
|
||||
import { textUi } from '@/jlmap3d/jl3dtrafficplan/sandbox/textUi';
|
||||
|
||||
|
||||
export function dataManager(scene,textUi,camera,routegroup) {
|
||||
let scope = this;
|
||||
|
||||
let section = new sectionModel();
|
||||
let signal = new signalModel();
|
||||
let station = new stationModel();
|
||||
let train = new trainModel();
|
||||
let section = new sectionModel(scene);
|
||||
let signal = new signalModel(scene);
|
||||
let station = new THREE.Group();
|
||||
scene.add( station );
|
||||
let train = new trainModel(scene);
|
||||
this.topCurve = "";
|
||||
this.downCurve = "";
|
||||
console.log(routegroup);
|
||||
this.nowConnect = '';
|
||||
|
||||
// var detaildiv = document.createElement("div");
|
||||
// detaildiv.style.width = "128px";
|
||||
// detaildiv.id = "detail";
|
||||
// detaildiv.style.backgroundColor = "#ccc"
|
||||
// detaildiv.style.height = "256px";
|
||||
// detaildiv.style.border = "1px solid #f00";
|
||||
// detaildiv.style.position = "absolute";
|
||||
// detaildiv.style.top = "0px";
|
||||
// detaildiv.style.zIndex = 10;
|
||||
// detaildiv.style.display = "none";
|
||||
// document.body.appendChild(detaildiv);
|
||||
// let text = new textUi(scene);
|
||||
// text.init();
|
||||
|
||||
let modelmanager = new ModelManager();
|
||||
Materialload(scope);
|
||||
|
||||
this.init = function(skinCode){
|
||||
loadGeoJson().then(function(data){
|
||||
//console.log(data);
|
||||
modelmanager.loadpromise().then(function (data) {
|
||||
console.log(data);
|
||||
return loadGeoJson();
|
||||
}).then(function(data){
|
||||
console.log(data);
|
||||
return loadMapData(skinCode);
|
||||
}).then(function(data){
|
||||
scope.nowConnect = new sandBoxConnect(scope,routegroup,section,signal,station,train);
|
||||
document.addEventListener( 'mousemove', onDocumentMouseMove, false );
|
||||
raycasterList.push(station);
|
||||
raycasterList.push(train.trainGroup);
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
let raycaster = new THREE.Raycaster();
|
||||
let mouse = new THREE.Vector2();
|
||||
let line,intersects,intersect;
|
||||
let raycasterList = [];
|
||||
|
||||
function onDocumentMouseMove( event ) {
|
||||
|
||||
event.preventDefault();
|
||||
|
||||
mouse.x = ( event.clientX / window.innerWidth ) * 2 - 1;
|
||||
mouse.y = - ( event.clientY / window.innerHeight ) * 2 + 1;
|
||||
|
||||
raycaster.setFromCamera( mouse, camera );
|
||||
|
||||
for(let i=0;i<raycasterList.length;i++){
|
||||
intersects = raycaster.intersectObjects( raycasterList[i].children );
|
||||
if(intersects.length>0){
|
||||
i = raycasterList.length;
|
||||
}
|
||||
}
|
||||
// console.log(intersects);
|
||||
if ( intersects.length > 0 ) {
|
||||
|
||||
intersect = intersects[ 0 ];
|
||||
console.log(intersect.object.position);
|
||||
// console.log(text.textplane.position);
|
||||
console.log(intersect.object.name);
|
||||
console.log(intersect.object.groupNumber);
|
||||
let uiPos = {
|
||||
x:event.clientX,
|
||||
y:event.clientY,
|
||||
};
|
||||
textUi.updataUi("",uiPos);
|
||||
|
||||
} else {
|
||||
// detaildiv.style.display = "none";
|
||||
textUi.updataUi("none");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
function loadMapData(skinCode){
|
||||
return new Promise(function(resolve, reject){
|
||||
|
||||
@ -35,7 +117,9 @@ export function dataManager(scene) {
|
||||
|
||||
getPublishMapDetail(skinCode).then(netdata => {
|
||||
console.log(netdata);
|
||||
section.init(netdata.sectionList,netdata.switchList);
|
||||
section.init(netdata.data.sectionList,netdata.data.switchList,stationData);
|
||||
signal.init(netdata.data.signalList,section.topData,section.downData,scope.topCurve,scope.downCurve,modelmanager.signal);
|
||||
train.init(netdata.data.trainList);
|
||||
resolve("loadMap");
|
||||
});
|
||||
});
|
||||
@ -61,36 +145,41 @@ export function dataManager(scene) {
|
||||
let stationListData = null;
|
||||
let originX = 0;
|
||||
let originY = 0;
|
||||
let double = 1000;
|
||||
let double = 10000;
|
||||
|
||||
//['成功了', 'success']
|
||||
readTextFile(JL3D_LOCAL_STATIC+"/trafficplan/fuzhou1.json", function(text){
|
||||
var data = JSON.parse(text);
|
||||
console.log(data.data.busline_list[0]);
|
||||
// console.log(data.data.busline_list[0]);
|
||||
stationListData = data.data.busline_list[0];
|
||||
let posx = stationListData.xs.split(",");
|
||||
let posz = stationListData.ys.split(",");
|
||||
|
||||
posx.reverse();
|
||||
posz.reverse();
|
||||
originX = posx[0];
|
||||
originY = posz[0];
|
||||
|
||||
let pointsTop = [];
|
||||
let pointsDown = [];
|
||||
for(let i=0;i<posx.length;i++){
|
||||
pointsTop.push(new THREE.Vector3( (posx[i] -originX)*double, 4.9, -(posz[i]-originY)*double));
|
||||
pointsDown.push(new THREE.Vector3( (posx[i] -originX+0.011)*double, 4.9, -(posz[i]-originY+0.001)*double));
|
||||
if(posx[i]<=119.390592){
|
||||
pointsTop.push(new THREE.Vector3( (posx[i] -originX)*double, 0, -(posz[i]-originY)*double));
|
||||
pointsDown.push(new THREE.Vector3( (posx[i] -originX+0.001)*double, 0, -(posz[i]-originY+0.001)*double));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
var curveTop = new THREE.CatmullRomCurve3(pointsTop );
|
||||
curveTop.curveType = "chordal";
|
||||
curveTop.tension = 0.15;
|
||||
curveTop.closed = false;
|
||||
|
||||
scope.topCurve = curveTop;
|
||||
|
||||
var curveDown = new THREE.CatmullRomCurve3(pointsDown );
|
||||
curveDown.curveType = "chordal";
|
||||
curveDown.tension = 0.15;
|
||||
curveDown.closed = false;
|
||||
scope.downCurve = curveDown;
|
||||
|
||||
var extrudeSettingsTop = {
|
||||
steps : pointsTop.length*2,
|
||||
@ -110,34 +199,37 @@ export function dataManager(scene) {
|
||||
|
||||
|
||||
var shapeTop = new THREE.Shape();
|
||||
shapeTop.moveTo( 0,-0.2 );
|
||||
shapeTop.lineTo( 0,0.2 );
|
||||
shapeTop.moveTo( 0,-1 );
|
||||
shapeTop.lineTo( 0,1 );
|
||||
|
||||
var shapeDown = new THREE.Shape();
|
||||
shapeDown.moveTo( 0,-0.2 );
|
||||
shapeDown.lineTo( 0,0.2 );
|
||||
|
||||
let materialSection = new THREE.MeshPhongMaterial( { color : 0x3366ff } );
|
||||
shapeDown.moveTo( 0,-1 );
|
||||
shapeDown.lineTo( 0,1 );
|
||||
|
||||
let materialSection1 = new THREE.MeshPhongMaterial( { color : 0x3366ff } );
|
||||
let materialSection2 = new THREE.MeshPhongMaterial( { color : 0x336600 } );
|
||||
|
||||
var geometryTop = new THREE.ExtrudeBufferGeometry( shapeTop, extrudeSettingsTop );
|
||||
var curveTop = new THREE.Mesh( geometryTop,materialSection) ;
|
||||
scene.add(curveTop);
|
||||
var curveTopMesh = new THREE.Mesh( geometryTop,materialSection1) ;
|
||||
scene.add(curveTopMesh);
|
||||
|
||||
var geometryDown = new THREE.ExtrudeBufferGeometry( shapeDown, extrudeSettingsDown );
|
||||
var curveDown = new THREE.Mesh( geometryDown,materialSection) ;
|
||||
scene.add(curveDown);
|
||||
var curveDownMesh = new THREE.Mesh( geometryDown,materialSection2) ;
|
||||
scene.add(curveDownMesh);
|
||||
|
||||
for(let j=0;j<stationListData.stations.length;j++){
|
||||
|
||||
var geometry = new THREE.RingBufferGeometry( 0.5, 1, 16 );
|
||||
var geometry = new THREE.RingBufferGeometry( 5, 10, 16 );
|
||||
var material = new THREE.MeshBasicMaterial( { color: 0xff3333, side: THREE.DoubleSide } );
|
||||
var cube = new THREE.Mesh( geometry, material );
|
||||
let pos = stationListData.stations[j].xy_coords.split(";");
|
||||
cube.position.set((pos[0] -originX+0.0005)*double,5,-(pos[1]-originY+0.0005)*double);
|
||||
|
||||
cube.name = stationListData.stations[j].name;
|
||||
cube.position.set((pos[0] -originX+0.0005)*double,0.2,-(pos[1]-originY+0.0005)*double);
|
||||
cube.rotation.x = Math.PI/2;
|
||||
console.log(cube.position);
|
||||
scene.add( cube );
|
||||
// console.log(cube.position);
|
||||
station.add(cube);
|
||||
|
||||
}
|
||||
resolve("loadJson");
|
||||
|
||||
|
70
src/jlmap3d/jl3dtrafficplan/sandbox/loader.js
Normal file
70
src/jlmap3d/jl3dtrafficplan/sandbox/loader.js
Normal file
@ -0,0 +1,70 @@
|
||||
import { BASE_ASSET_API } from '@/api/jlmap3d/assets3d.js';
|
||||
import store from '@/store/index';
|
||||
//模型管理器
|
||||
let mode = "0";
|
||||
export function ModelManager(){
|
||||
let scope = this;
|
||||
|
||||
scope.signal = {
|
||||
id: "1",
|
||||
name: "信号机",
|
||||
deviceType: "signal",
|
||||
type: "signal",
|
||||
url: "/MODEL/2020-07-10/13-42231.FBX",
|
||||
mesh:''
|
||||
};
|
||||
scope.train = {
|
||||
id: "2",
|
||||
name: "列车",
|
||||
deviceType: "train",
|
||||
type: "train",
|
||||
url: "/MODEL/2020-11-16/57-53841.FBX",
|
||||
mesh:''
|
||||
};
|
||||
|
||||
this.station = {
|
||||
code:null,
|
||||
screenDoorOpenStatus:"01",
|
||||
animations:null,
|
||||
mesh:null,
|
||||
action:null
|
||||
};
|
||||
this.station = {
|
||||
code:null,
|
||||
screenDoorOpenStatus:"01",
|
||||
animations:null,
|
||||
mesh:null,
|
||||
action:null
|
||||
};
|
||||
|
||||
//读取模型
|
||||
this.loadpromise = function (mixers){
|
||||
let initlist = [];
|
||||
initlist.push(fbxpromise(scope.signal));
|
||||
initlist.push(fbxpromise(scope.train));
|
||||
//promise按顺序加载
|
||||
return new Promise(function(resolve, reject){
|
||||
|
||||
Promise.all(initlist).then((result) => {
|
||||
// store.dispatch('app/animationsClose');
|
||||
resolve("success"); //['成功了', 'success']
|
||||
}).catch((error) => {
|
||||
//console.log(error);
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
//fbx模型加载
|
||||
function fbxpromise(asset){
|
||||
return new Promise(function(resolve, reject){
|
||||
var loader = new THREE.FBXLoader();
|
||||
|
||||
loader.load( BASE_ASSET_API+asset.url, function ( object ) {
|
||||
asset.mesh = object;
|
||||
resolve(asset.deviceType);
|
||||
} );
|
||||
|
||||
});
|
||||
}
|
@ -1,3 +1,179 @@
|
||||
export function sandBoxConnect() {
|
||||
let scope = this;
|
||||
|
||||
import StompClient from '@/utils/sock';
|
||||
import { getBaseUrl } from '@/utils/baseUrl'
|
||||
import { getToken } from '@/utils/auth';
|
||||
import store from '@/store/index';
|
||||
|
||||
// 定于仿真socket接口
|
||||
export function sandBoxConnect(manager,routegroup,section,signal,station,train ) {
|
||||
let scope = this;
|
||||
this.teststomp = new StompClient();
|
||||
let start = true;
|
||||
let topic = '/user/queue/simulation/jl3d/'+routegroup;
|
||||
let header = {'X-Token': getToken() };
|
||||
let topswitch = false;
|
||||
let downswitch = false;
|
||||
socketon(topic);
|
||||
|
||||
function socketon(topic) {
|
||||
try {
|
||||
scope.teststomp.subscribe(topic, callback, header);
|
||||
} catch (error) {
|
||||
console.error('websocket订阅失败');
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
this.socketoff = function(topic) {
|
||||
scope.teststomp.unsubscribe(topic);
|
||||
};
|
||||
|
||||
// 仿真socket接口回调函数
|
||||
function callback(Response) {
|
||||
let data = JSON.parse(Response.body);
|
||||
|
||||
/** 站台客流当前人数信息 */
|
||||
if(data.type == "STAND_PFI"){
|
||||
|
||||
let newStandData = data.body;
|
||||
let count = 0;
|
||||
for(let j=0;j<passerStation.stationlist.length;j++){
|
||||
count = 0;
|
||||
|
||||
for(let i=0;i<newStandData.length;i++){
|
||||
|
||||
|
||||
if(passerStation.stationlist[j].topstand == newStandData[i].standCode){
|
||||
|
||||
passerStation.stationlist[j].topspeed = newStandData[i].to;
|
||||
passerStation.stationlist[j].toppassers = newStandData[i].num;
|
||||
count++;
|
||||
}
|
||||
if(passerStation.stationlist[j].downstand == newStandData[i].standCode){
|
||||
|
||||
passerStation.stationlist[j].downspeed = newStandData[i].to;
|
||||
passerStation.stationlist[j].downpassers = newStandData[i].num;
|
||||
count++;
|
||||
}
|
||||
|
||||
if(count == 2){
|
||||
i = newStandData.length;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
jl3d.updateNowStationData();
|
||||
|
||||
if(start){
|
||||
start = false;
|
||||
jl3d.initTrafficStart();
|
||||
}
|
||||
|
||||
// jl3d.allStationData = data.body;
|
||||
}
|
||||
|
||||
if(data.type == "TRAIN_PFI_BL"){
|
||||
|
||||
if(toptrain.nowcode == data.body.code && topswitch == true){
|
||||
|
||||
//根据上下车人数创建人
|
||||
jl3d.updateNowLeaveData("top",data.body.out);
|
||||
setTimeout(function(){
|
||||
passerAi.passerout("top","start",data.body.in)
|
||||
}, 5000);
|
||||
|
||||
}
|
||||
if(downtrain.nowcode == data.body.code && downswitch == true){
|
||||
//根据上下车人数创建人
|
||||
jl3d.updateNowLeaveData("down",data.body.out);
|
||||
setTimeout(function(){
|
||||
passerAi.passerout("down","start",data.body.in);
|
||||
}, 5000);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(data.type == "DeviceCtrl_3D"){
|
||||
if(data.body.type == "PSD"){
|
||||
|
||||
|
||||
}
|
||||
|
||||
if(data.body.type == "TRAIN_DOOR"){
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
if(data.type == "TrainRun_3D"){
|
||||
for(let i=0;i<data.body.length;i++){
|
||||
//top
|
||||
if(data.body[i].right == 1){
|
||||
if(section.topSectionList[data.body[i].section]){
|
||||
if(train.trainlist[data.body[i].code].dispose == false){
|
||||
train.trainlist[data.body[i].code].dispose = true;
|
||||
train.trainGroup.add(train.trainlist[data.body[i].code]);
|
||||
}else{
|
||||
let realprogress = section.topSectionList[data.body[i].section].leftProgress+(section.topSectionList[data.body[i].section].rightProgress - section.topSectionList[data.body[i].section].leftProgress)*data.body[i].offset;
|
||||
train.trainlist[data.body[i].code].position.copy(manager.topCurve.getPoint(realprogress));
|
||||
|
||||
train.trainlist[data.body[i].code].up = new THREE.Vector3(1,0,0);
|
||||
let tangent = manager.topCurve.getTangentAt(realprogress).normalize();
|
||||
train.trainlist[data.body[i].code].axis.crossVectors(train.trainlist[data.body[i].code].up, tangent).normalize();
|
||||
let radians = Math.acos(train.trainlist[data.body[i].code].up.dot(tangent));
|
||||
train.trainlist[data.body[i].code].quaternion.setFromAxisAngle(train.trainlist[data.body[i].code].axis, radians);
|
||||
// console.log("/////");
|
||||
// console.log("offset:"+data.body[i].offset);
|
||||
// console.log("left:"+section.topSectionList[data.body[i].section].leftProgress);
|
||||
// console.log("right:"+section.topSectionList[data.body[i].section].rightProgress);
|
||||
// console.log("real:"+realprogress);
|
||||
}
|
||||
|
||||
}else{
|
||||
train.trainlist[data.body[i].code].dispose = false;
|
||||
train.trainGroup.remove(train.trainlist[data.body[i].code]);
|
||||
}
|
||||
}
|
||||
//down
|
||||
if(data.body[i].right == 0){
|
||||
if(section.downSectionList[data.body[i].section]){
|
||||
if(train.trainlist[data.body[i].code].dispose == false){
|
||||
train.trainlist[data.body[i].code].dispose = true;
|
||||
train.trainGroup.add(train.trainlist[data.body[i].code]);
|
||||
}else{
|
||||
|
||||
let realprogress = section.downSectionList[data.body[i].section].leftProgress +(section.downSectionList[data.body[i].section].rightProgress - section.downSectionList[data.body[i].section].leftProgress)*data.body[i].offset;
|
||||
train.trainlist[data.body[i].code].position.copy(manager.downCurve.getPoint(realprogress));
|
||||
|
||||
train.trainlist[data.body[i].code].up = new THREE.Vector3(-1,0,0);
|
||||
let tangent = manager.downCurve.getTangentAt(realprogress).normalize();
|
||||
train.trainlist[data.body[i].code].axis.crossVectors(train.trainlist[data.body[i].code].up, tangent).normalize();
|
||||
let radians = Math.acos(train.trainlist[data.body[i].code].up.dot(tangent));
|
||||
train.trainlist[data.body[i].code].quaternion.setFromAxisAngle(train.trainlist[data.body[i].code].axis, radians);
|
||||
|
||||
}
|
||||
|
||||
}else{
|
||||
|
||||
train.trainlist[data.body[i].code].dispose = false;
|
||||
train.trainGroup.remove(train.trainlist[data.body[i].code]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(data.type == 'Device_Load_Destroy_3D'){
|
||||
|
||||
}
|
||||
|
||||
|
||||
if(data.type == 'Simulation_Over') {
|
||||
store.dispatch('LogOut').then(() => {
|
||||
location.reload();
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,18 +1,27 @@
|
||||
export function sectionModel() {
|
||||
let scope = this;
|
||||
this.sections={
|
||||
datalist:[]
|
||||
};
|
||||
|
||||
this.stopsection = [];
|
||||
|
||||
this.topData = [];
|
||||
this.downData = [];
|
||||
this.topSectionList = [];
|
||||
this.downSectionList = [];
|
||||
this.init = function(sectiondata,switchdata,stationdata){
|
||||
|
||||
this.init = function(sectiondata,switchdata){
|
||||
for(let i=0;i<sectiondata.length;i++){
|
||||
if(sectiondata[i].type == "01" || sectiondata[i].type == "03"){
|
||||
//初始化区段对象数据
|
||||
let newsection = new SectionModel(sectiondata[i]);
|
||||
let newsection = {};
|
||||
// console.log(sectiondata[i]);
|
||||
newsection.name = sectiondata[i].name;
|
||||
newsection.code = sectiondata[i].code;
|
||||
newsection.index = i;
|
||||
newsection.type = sectiondata[i].type;
|
||||
newsection.lengthFact = sectiondata[i].lengthFact;
|
||||
|
||||
newsection.stationcode = sectiondata[i].stationCode;
|
||||
newsection.rsection = sectiondata[i].rightSectionCode;
|
||||
newsection.lsection = sectiondata[i].leftSectionCode;
|
||||
@ -136,5 +145,85 @@ export function sectionModel() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
let topStartSection,topEndSection,
|
||||
downStartSection,downEndSection;
|
||||
for(let i=0;i<stationdata[0].stands.length;i++){
|
||||
if(stationdata[0].stands[i].right == true){
|
||||
topStartSection = stationdata[0].stands[i].section;
|
||||
}
|
||||
if(stationdata[0].stands[i].right == false){
|
||||
downStartSection = stationdata[0].stands[i].section;
|
||||
}
|
||||
}
|
||||
let endNum = stationdata.length-1;
|
||||
for(let i=0;i<stationdata[endNum].stands.length;i++){
|
||||
if(stationdata[0].stands[i].right == true){
|
||||
topEndSection = stationdata[endNum].stands[i].section;
|
||||
}
|
||||
if(stationdata[0].stands[i].right == false){
|
||||
downEndSection = stationdata[endNum].stands[i].section;
|
||||
}
|
||||
}
|
||||
|
||||
let topSections = [];
|
||||
let topLengthFact = 0;
|
||||
topLengthFact += scope.sections.datalist[topStartSection].lengthFact;
|
||||
topSections.push(scope.sections.datalist[topStartSection]);
|
||||
for(let i=0;i<1000;i++){
|
||||
|
||||
if(scope.sections.datalist[topStartSection].rsection != topEndSection){
|
||||
topStartSection = [scope.sections.datalist[topStartSection].rsection];
|
||||
topLengthFact += scope.sections.datalist[topStartSection].lengthFact;
|
||||
topSections.push(scope.sections.datalist[topStartSection]);
|
||||
}else{
|
||||
topStartSection = [scope.sections.datalist[topStartSection].rsection];
|
||||
topLengthFact += scope.sections.datalist[topStartSection].lengthFact;
|
||||
topSections.push(scope.sections.datalist[topStartSection]);
|
||||
i = 1000;
|
||||
}
|
||||
}
|
||||
|
||||
let downSections = [];
|
||||
let downLengthFact = 0;
|
||||
downLengthFact += scope.sections.datalist[downStartSection].lengthFact;
|
||||
downSections.push(scope.sections.datalist[downStartSection]);
|
||||
for(let i=0;i<1000;i++){
|
||||
|
||||
if(scope.sections.datalist[downStartSection].rsection != downEndSection){
|
||||
downStartSection = [scope.sections.datalist[downStartSection].rsection];
|
||||
downLengthFact += scope.sections.datalist[downStartSection].lengthFact;
|
||||
downSections.push(scope.sections.datalist[downStartSection]);
|
||||
}else{
|
||||
downStartSection = [scope.sections.datalist[downStartSection].rsection];
|
||||
downLengthFact += scope.sections.datalist[downStartSection].lengthFact;
|
||||
downSections.push(scope.sections.datalist[downStartSection]);
|
||||
i = 1000;
|
||||
}
|
||||
}
|
||||
let nowLengthFact = 0;
|
||||
for(let i=0;i<topSections.length;i++){
|
||||
topSections[i].leftProgress = nowLengthFact/topLengthFact;
|
||||
nowLengthFact += topSections[i].lengthFact;
|
||||
topSections[i].rightProgress = nowLengthFact/topLengthFact;
|
||||
scope.topSectionList[topSections[i].code] = topSections[i];
|
||||
|
||||
}
|
||||
|
||||
nowLengthFact = 0;
|
||||
for(let i=0;i<downSections.length;i++){
|
||||
downSections[i].leftProgress = nowLengthFact/downLengthFact;
|
||||
nowLengthFact += downSections[i].lengthFact;
|
||||
downSections[i].rightProgress = nowLengthFact/downLengthFact;
|
||||
scope.downSectionList[downSections[i].code] = downSections[i];
|
||||
}
|
||||
|
||||
scope.topData = topSections;
|
||||
scope.downData = downSections;
|
||||
|
||||
console.log(topSections);
|
||||
console.log(topLengthFact);
|
||||
console.log(downSections);
|
||||
console.log(downLengthFact);
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,34 @@
|
||||
export function signalModel() {
|
||||
export function signalModel(scene) {
|
||||
let scope = this;
|
||||
|
||||
this.init = function(signalData,topData,downData,topCurve,downCurve,originMesh){
|
||||
console.log(originMesh);
|
||||
for(let i=0;i<signalData.length;i++){
|
||||
if(signalData[i].right == true){
|
||||
for(let j=0;j<topData.length;j++){
|
||||
if(signalData[i].sectionCode == topData[j].code){
|
||||
let newsignal = originMesh.mesh.clone(true);
|
||||
|
||||
newsignal.position.copy(topCurve.getPoint(topData[j].rightProgress));
|
||||
|
||||
scene.add( newsignal );
|
||||
j = topData.length;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(signalData[i].right == false){
|
||||
for(let j=0;j<downData.length;j++){
|
||||
if(signalData[i].sectionCode == downData[j].code){
|
||||
let newsignal = originMesh.mesh.clone(true);
|
||||
|
||||
newsignal.position.copy(downCurve.getPoint(downData[j].leftProgress));
|
||||
|
||||
scene.add( newsignal );
|
||||
j = downData.length;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
70
src/jlmap3d/jl3dtrafficplan/sandbox/textUi.js
Normal file
70
src/jlmap3d/jl3dtrafficplan/sandbox/textUi.js
Normal file
@ -0,0 +1,70 @@
|
||||
import { JL3D_LOCAL_STATIC } from '@/api/jlmap3d/assets3d.js';
|
||||
export function textUi(scene) {
|
||||
let scope = this;
|
||||
var stationcanvas = new Image();
|
||||
stationcanvas.src = JL3D_LOCAL_STATIC+"/texture/msgtnew.png";
|
||||
this.textplane = "";
|
||||
let textmaterial,textt;
|
||||
this.init = function(){
|
||||
let textgeometry = new THREE.PlaneBufferGeometry( 65, 90, 1 );
|
||||
textt = new THREE.CanvasTexture(getTextCanvas(""));
|
||||
// let materialSection2 = new THREE.MeshPhongMaterial( { color : 0x336600 } );
|
||||
textmaterial = new THREE.MeshBasicMaterial( { side: THREE.DoubleSide,map:textt ,transparent: true} );
|
||||
scope.textplane = new THREE.Mesh( textgeometry, textmaterial );
|
||||
// scope.textplane.rotation.z = Math.PI/2;
|
||||
scene.add(scope.textplane);
|
||||
}
|
||||
|
||||
this.updateUi = function(textData){
|
||||
textt = new THREE.CanvasTexture(getTextCanvas(""));
|
||||
|
||||
textmaterial = new THREE.MeshBasicMaterial( { side: THREE.DoubleSide,map:textt ,transparent: true} );
|
||||
textplane = new THREE.Mesh( textgeometry, textmaterial );
|
||||
textplane.name = stationdata[i].code;
|
||||
|
||||
newstationmesh.add(textplane);
|
||||
textgeometry.dispose();
|
||||
textmaterial.dispose();
|
||||
textt.dispose();
|
||||
}
|
||||
|
||||
function getTextCanvas(text){
|
||||
let canvas = document.getElementById('canvastexture');
|
||||
|
||||
canvas.width = 128;
|
||||
canvas.height = 256;
|
||||
// canvas.style.width = width;
|
||||
// canvas.style.height = height;
|
||||
|
||||
let ctx = canvas.getContext('2d');
|
||||
//ctx.fillStyle = '#FFFFFF';
|
||||
ctx.fillRect(0, 0,128,256);
|
||||
|
||||
ctx.fillStyle = '#FFFFFF';
|
||||
// ctx.textAlign = 'center';
|
||||
// ctx.textBaseline = 'middle';
|
||||
ctx.clearRect(0,0,128,256);
|
||||
|
||||
ctx.drawImage(stationcanvas,0,0,128,256);
|
||||
|
||||
ctx.font = "10px";
|
||||
if(text == ""){
|
||||
|
||||
}else{
|
||||
ctx.fillText("车站: "+text.name, 15,25);
|
||||
|
||||
ctx.fillText("漫游", 18,48);
|
||||
ctx.fillText("信息", 54,48);
|
||||
ctx.fillText("备忘", 93,48);
|
||||
|
||||
ctx.fillText("车站序号: "+text.name, 10,115);
|
||||
|
||||
ctx.fillText("公里标记:",10 ,135);
|
||||
ctx.fillText(text.kmPost,10 ,155);
|
||||
}
|
||||
|
||||
|
||||
let data = ctx.getImageData(0, 0,128,256);
|
||||
return data;
|
||||
}
|
||||
}
|
@ -1,3 +1,20 @@
|
||||
export function trainModel() {
|
||||
export function trainModel(scene) {
|
||||
let scope = this;
|
||||
this.trainGroup = new THREE.Group();
|
||||
this.trainlist = [];
|
||||
scene.add(scope.trainGroup);
|
||||
|
||||
this.init = function(trainData){
|
||||
for(let i=0;i<trainData.length;i++){
|
||||
var geometry = new THREE.BoxGeometry( 30, 10, 10 );
|
||||
var material = new THREE.MeshBasicMaterial( {color: 0x00ff00} );
|
||||
var trainBox = new THREE.Mesh( geometry, material );
|
||||
trainBox.code = trainData[i].code;
|
||||
trainBox.groupNumber = trainData[i].groupNumber;
|
||||
trainBox.dispose = false;
|
||||
trainBox.up = new THREE.Vector3(1, 0, 0);
|
||||
trainBox.axis = new THREE.Vector3();
|
||||
scope.trainlist[trainData[i].groupNumber] = trainBox;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -11,13 +11,15 @@ export function Materialload(jlmap3dedit,standTextureData){
|
||||
|
||||
settexture( jlmap3dedit.materiallist,"black",JL3D_LOCAL_STATIC+'/material/signal/5.jpg');
|
||||
}
|
||||
|
||||
if(standTextureData.urls.length > 1){
|
||||
for(let i=0,leni=standTextureData.urls.length;i<leni;i++){
|
||||
setstationtexture(jlmap3dedit.stationtexture,standTextureData.urls[i].name,BASE_ASSET_API + standTextureData.urls[i].url);
|
||||
if(standTextureData){
|
||||
if(standTextureData.urls.length > 1){
|
||||
for(let i=0,leni=standTextureData.urls.length;i<leni;i++){
|
||||
setstationtexture(jlmap3dedit.stationtexture,standTextureData.urls[i].name,BASE_ASSET_API + standTextureData.urls[i].url);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
function settexture(materiallist,name,textureurl){
|
||||
|
@ -170,8 +170,7 @@ class SkinCode extends defaultStyle {
|
||||
},
|
||||
lamp: {
|
||||
bgShow: true, // 是否被选中
|
||||
logicDisplayNone: true, // 逻辑点灯斜线不显示
|
||||
guidName: 'doubleAndBase', // 默认引导类型
|
||||
guidName: 'double', // 默认引导类型
|
||||
stopWidth: 2, // 禁止线宽度
|
||||
borderWidth: 0, // 信号灯边框线宽度
|
||||
borderColor: '#FF0000', // 信号灯边框线颜色 (虚拟信号机)
|
||||
|
@ -516,7 +516,7 @@ class Signal extends Group {
|
||||
|
||||
// 逻辑点灯
|
||||
logicalLight() {
|
||||
if (this.style.Signal.lamp.guideName == 'half') {
|
||||
if (this.style.Signal.lamp.guidName == 'half') {
|
||||
// 宁波三号线逻辑电灯灯柱颜色
|
||||
this.sigPost.setColor(this.style.Signal.post.standardColor);
|
||||
this.lamps.forEach(lamp => { lamp.setBorderColor(this.style.Signal.lamp.borderColor); });
|
||||
@ -527,7 +527,7 @@ class Signal extends Group {
|
||||
|
||||
// 物理点灯
|
||||
physicsLight() {
|
||||
if (this.style.Signal.lamp.guideName == 'half') {
|
||||
if (this.style.Signal.lamp.guidName == 'half') {
|
||||
// 宁波三号线逻辑电灯灯柱颜色
|
||||
this.sigPost.setColor(this.style.Signal.post.physicColor);
|
||||
this.lamps.forEach(lamp => { lamp.setBorderColor(this.style.Signal.lamp.physicColor); });
|
||||
|
@ -16,7 +16,7 @@ class Theme {
|
||||
'11': 'xian_01',
|
||||
'12': 'ningbo_03',
|
||||
'13': 'race_01',
|
||||
'14': 'haerbin_01' // 南京二号线菜单暂用 哈尔滨的
|
||||
'14': 'nanjing_02' // 南京二号线
|
||||
};
|
||||
this._localShowMode = { // 现地显示模式
|
||||
'01': 'all', // 成都一 全显
|
||||
|
@ -51,6 +51,18 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
logicMenu: [
|
||||
{
|
||||
label: '设置限速',
|
||||
handler: this.setSpeed,
|
||||
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
|
||||
},
|
||||
{
|
||||
label: '取消限速',
|
||||
handler: this.cancelSpeed,
|
||||
cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED
|
||||
}
|
||||
],
|
||||
menuNormal: {
|
||||
Local: [
|
||||
{
|
||||
@ -82,17 +94,6 @@ export default {
|
||||
label: this.$t('menu.menuSection.sectionUnblock'),
|
||||
handler: this.unlock,
|
||||
cmdType: CMD.Section.CMD_SECTION_UNBLOCK
|
||||
},
|
||||
{
|
||||
label: '设置限速',
|
||||
handler: this.setSpeed,
|
||||
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
|
||||
|
||||
},
|
||||
{
|
||||
label: '取消限速',
|
||||
handler: this.cancelSpeed,
|
||||
cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED
|
||||
}
|
||||
],
|
||||
Center: [
|
||||
@ -125,16 +126,6 @@ export default {
|
||||
label: this.$t('menu.menuSection.sectionUnblock'),
|
||||
handler: this.unlock,
|
||||
cmdType: CMD.Section.CMD_SECTION_UNBLOCK
|
||||
},
|
||||
{
|
||||
label: '设置限速',
|
||||
handler: this.setSpeed,
|
||||
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
|
||||
},
|
||||
{
|
||||
label: '取消限速',
|
||||
handler: this.cancelSpeed,
|
||||
cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -199,8 +190,14 @@ export default {
|
||||
},
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
if (this.selected.type != '04') {
|
||||
if (this.selected.type == '01' || this.selected.type == '03') {
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
} else if (this.selected.type == '02') {
|
||||
const logic = {
|
||||
Local: [...this.menuNormal.Local, ...this.logicMenu],
|
||||
Center: [...this.menuNormal.Center, ...this.logicMenu]
|
||||
};
|
||||
this.menu = MenuContextHandler.covert(logic);
|
||||
} else {
|
||||
this.menu = [];
|
||||
}
|
||||
|
@ -53,36 +53,36 @@ export default {
|
||||
menuNormal: {
|
||||
Local: [],
|
||||
Center: [
|
||||
{
|
||||
label: this.$t('menu.menuTrain.addTrainId'),
|
||||
handler: this.undeveloped,
|
||||
cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuTrain.deleteTrainId'),
|
||||
handler: this.undeveloped,
|
||||
cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
|
||||
},
|
||||
// {
|
||||
// label: this.$t('menu.menuTrain.addTrainId'),
|
||||
// handler: this.undeveloped,
|
||||
// cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
|
||||
// },
|
||||
// {
|
||||
// label: this.$t('menu.menuTrain.deleteTrainId'),
|
||||
// handler: this.undeveloped,
|
||||
// cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
|
||||
// },
|
||||
{
|
||||
label: this.$t('menu.menuTrain.editTrainId'),
|
||||
handler: this.editTrainId,
|
||||
cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuTrain.editTrainNo'),
|
||||
handler: this.undeveloped,
|
||||
cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuTrain.moveTrainId'),
|
||||
handler: this.undeveloped,
|
||||
cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuTrain.switchTrainId'),
|
||||
handler: this.undeveloped,
|
||||
cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
|
||||
}
|
||||
// {
|
||||
// label: this.$t('menu.menuTrain.editTrainNo'),
|
||||
// handler: this.undeveloped,
|
||||
// cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
|
||||
// },
|
||||
// {
|
||||
// label: this.$t('menu.menuTrain.moveTrainId'),
|
||||
// handler: this.undeveloped,
|
||||
// cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
|
||||
// },
|
||||
// {
|
||||
// label: this.$t('menu.menuTrain.switchTrainId'),
|
||||
// handler: this.undeveloped,
|
||||
// cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
|
||||
// }
|
||||
]
|
||||
},
|
||||
menuForce: [
|
||||
|
@ -0,0 +1,370 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag class="haerbin-01__systerm confirm-control" :title="title" :visible.sync="show" width="360px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false" append-to-body>
|
||||
<div class="context">
|
||||
<template v-for="(message,index) in messages">
|
||||
<span :key="index">{{ message }}</span>
|
||||
</template>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('global.confirm') }}</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="haerbin-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'ConfirmControl',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operate: {},
|
||||
messages: '',
|
||||
operation: null
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
if (this.operation === OperationEvent.Signal.arrangementRoute.menu.operation) {
|
||||
return this.$t('menu.accessSetting');
|
||||
} else if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
|
||||
return this.$t('menu.menuSignal.signalOff');
|
||||
} else if (this.operation === OperationEvent.Signal.reopenSignal.menu.operation) {
|
||||
return this.$t('menu.menuSignal.signalReopen');
|
||||
} else if (this.operation === OperationEvent.Signal.cancelTrainRoute.menu.operation) {
|
||||
return this.$t('menu.cancelTheWay');
|
||||
} else if (this.operation === OperationEvent.Signal.humanControl.menu.operation) {
|
||||
return this.$t('menu.approachManualControl');
|
||||
} else if (this.operation === OperationEvent.Signal.atsAutoControl.menu.operation) {
|
||||
return this.$t('menu.accessToATSAutomaticControl');
|
||||
} else if (this.operation === OperationEvent.StationStand.setRunLevel.menu.operation) {
|
||||
return this.$t('menu.menuStationStand.setRunLevel');
|
||||
} else if (this.operation === OperationEvent.StationStand.setStopTime.menu.operation) {
|
||||
return this.$t('menu.stopTime');
|
||||
} else if (this.operation === OperationEvent.StationStand.setBackStrategy.menu.operation) {
|
||||
return this.$t('menu.setSwitchbackStrategy');
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation === OperationEvent.Signal.arrangementRoute.menu.operation) {
|
||||
/** 进路设置*/
|
||||
return OperationEvent.Signal.arrangementRoute.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
|
||||
/** 信号关灯*/
|
||||
return OperationEvent.Signal.signalClose.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Signal.reopenSignal.menu.operation) {
|
||||
/** 信号重开*/
|
||||
return OperationEvent.Signal.reopenSignal.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Signal.cancelTrainRoute.menu.operation) {
|
||||
/** 取消进路*/
|
||||
return OperationEvent.Signal.cancelTrainRoute.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Signal.humanControl.menu.operation) {
|
||||
/** 进路交人工控*/
|
||||
return OperationEvent.Signal.humanControl.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Signal.atsAutoControl.menu.operation) {
|
||||
/** 进路交ATS自动控*/
|
||||
return OperationEvent.Signal.atsAutoControl.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.StationStand.setRunLevel.menu.operation) {
|
||||
/** 设置运行等级*/
|
||||
return OperationEvent.StationStand.setRunLevel.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.StationStand.setStopTime.menu.operation) {
|
||||
/** 设置停站时间*/
|
||||
return OperationEvent.StationStand.setStopTime.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.StationStand.setBackStrategy.menu.operation) {
|
||||
/** 设置折返策略*/
|
||||
return OperationEvent.StationStand.setBackStrategy.confirm.domId;
|
||||
}
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
this.operate = operate || {};
|
||||
this.messages = operate.messages;
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
if (this.operation === OperationEvent.Signal.arrangementRoute.menu.operation) {
|
||||
/** 进路设置*/
|
||||
this.routeSetting();
|
||||
} else if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
|
||||
/** 信号关灯*/
|
||||
this.signalClose();
|
||||
} else if (this.operation === OperationEvent.Signal.reopenSignal.menu.operation) {
|
||||
/** 信号重开*/
|
||||
this.reopenSignal();
|
||||
} else if (this.operation === OperationEvent.Signal.cancelTrainRoute.menu.operation) {
|
||||
/** 取消进路*/
|
||||
this.cancelTrainRoute();
|
||||
} else if (this.operation === OperationEvent.Signal.humanControl.menu.operation) {
|
||||
/** 进路交人工控*/
|
||||
this.humanControl();
|
||||
} else if (this.operation === OperationEvent.Signal.atsAutoControl.menu.operation) {
|
||||
/** 进路交ATS自动控*/
|
||||
this.atsAutoControl();
|
||||
} else if (this.operation === OperationEvent.StationStand.setRunLevel.menu.operation) {
|
||||
/** 设置运行等级*/
|
||||
this.setRunLevel();
|
||||
} else if (this.operation === OperationEvent.StationStand.setStopTime.menu.operation) {
|
||||
/** 停站时间*/
|
||||
this.setStopTime();
|
||||
} else if (this.operation === OperationEvent.StationStand.setBackStrategy.menu.operation) {
|
||||
/** 设置折返策略*/
|
||||
this.setBackStrategy();
|
||||
}
|
||||
},
|
||||
// 进路设置
|
||||
routeSetting() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Signal.arrangementRoute.confirm.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 信号关灯
|
||||
signalClose() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Signal.signalClose.confirm.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 信号重开
|
||||
reopenSignal() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Signal.reopenSignal.confirm.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 取消进路
|
||||
cancelTrainRoute() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Signal.cancelTrainRoute.confirm.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 进路交人工控
|
||||
humanControl() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Signal.humanControl.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 进路交ATS自动控
|
||||
atsAutoControl() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Signal.atsAutoControl.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 设置运行等级
|
||||
setRunLevel() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.StationStand.setRunLevel.confirm.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_RUN_TIME,
|
||||
val: this.operate.val
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 停站时间
|
||||
setStopTime() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.StationStand.setStopTime.confirm.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_PARK_TIME,
|
||||
val: this.operate.val
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 设置折返策略
|
||||
setBackStrategy() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.StationStand.setBackStrategy.confirm.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_REENTRY_STRATEGY,
|
||||
val: this.operate.val
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.confirm-control .context {
|
||||
padding-bottom: 40px !important;
|
||||
border: 1px solid lightgray;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,144 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag class="haerbin-01__systerm confirm-control-speed" :title="title" :visible.sync="show" width="540px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false" append-to-body>
|
||||
<div style="height: 60px; padding-left: 20px">
|
||||
<span style="font-size: 18px">{{ message }}</span>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="6" :offset="6">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('global.confirm') }}</el-button>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
export default {
|
||||
name: 'ConfirmControlSpeed',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operation: '',
|
||||
message: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation === OperationEvent.Section.setSpeed.order.operation) {
|
||||
return this.$t('menu.menuSection.sectionSetSpeedLimit');
|
||||
} else if (this.operation === OperationEvent.Section.cancelSpeed.order.operation) {
|
||||
return this.$t('menu.menuSection.sectionCancelSpeedLimit');
|
||||
} else if (this.operation === OperationEvent.Switch.setSpeed.order.operation) {
|
||||
return this.$t('menu.switchSettingSpeedLimit');
|
||||
} else if (this.operation === OperationEvent.Switch.cancelSpeed.order.operation) {
|
||||
return this.$t('menu.menuSection.sectionCancelSpeedLimit');
|
||||
}
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation === OperationEvent.Section.setSpeed.order.operation) {
|
||||
return OperationEvent.Section.setSpeed.confirm.domId; // 区段设置限速
|
||||
} else if (this.operation === OperationEvent.Section.cancelSpeed.order.operation) {
|
||||
return OperationEvent.Section.cancelSpeed.confirm.domId; // 区段取消限速
|
||||
} else if (this.operation === OperationEvent.Switch.setSpeed.order.operation) {
|
||||
return OperationEvent.Switch.setSpeed.confirm.domId; // 道岔设置限速
|
||||
} else if (this.operation === OperationEvent.Switch.cancelSpeed.order.operation) {
|
||||
return OperationEvent.Switch.cancelSpeed.confirm.domId; // 道岔取消限速
|
||||
}
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
if (!this.dialogShow) {
|
||||
this.operation = operate.operation;
|
||||
this.message = operate.message;
|
||||
}
|
||||
|
||||
this.loading = false;
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
const operate = {};
|
||||
|
||||
if (this.operation === OperationEvent.Section.setSpeed.order.operation) {
|
||||
/** 区段设置限速*/
|
||||
operate.operation = OperationEvent.Section.setSpeed.confirm.operation;
|
||||
} else if (this.operation === OperationEvent.Section.cancelSpeed.order.operation) {
|
||||
/** 区段取消限速*/
|
||||
operate.operation = OperationEvent.Section.cancelSpeed.confirm.operation;
|
||||
} else if (this.operation === OperationEvent.Switch.setSpeed.order.operation) {
|
||||
/** 道岔设置限速*/
|
||||
operate.operation = OperationEvent.Switch.setSpeed.confirm.operation;
|
||||
} else if (this.operation === OperationEvent.Switch.cancelSpeed.order.operation) {
|
||||
/** 道岔取消限速*/
|
||||
operate.operation = OperationEvent.Switch.cancelSpeed.confirm.operation;
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.$emit('setOperate', { step: 1, success: true });
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$emit('setOperate', { step: 0, success: false });
|
||||
this.doClose();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.$emit('setOperate', { step: 0, success: false });
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.confirm-control-speed .context {
|
||||
padding-bottom: 40px !important;
|
||||
border: 1px solid lightgray;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,126 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="haerbin-01__systerm route-unlock-confirm"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="500px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<div style="height: 60px; padding-left: 20px">
|
||||
<span>{{ $t('menu.in') }}{{ stationName }}【{{ signalName }}】{{ $t('menu.signalConfirmed') }}</span>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="6" :offset="6">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('global.confirm') }}</el-button>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
export default {
|
||||
name: 'RouteUnlockConfirm',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
signalName: '',
|
||||
stationName: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
return this.$t('menu.signalDeblocking');
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Signal.unlock.confirm.domId : '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.stationName = '';
|
||||
this.signalName = '';
|
||||
if (selected) {
|
||||
this.signalName = selected.name;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
}
|
||||
|
||||
this.loading = false;
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Signal.unlock.confirm.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.$emit('setOperate', { step: 1, success: true });
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.$emit('setOperate', { step: 0, success: false });
|
||||
this.doClose();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.$emit('setOperate', { step: 0, success: false });
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.route-unlock-confirm .context {
|
||||
padding-bottom: 40px !important;
|
||||
border: 1px solid lightgray;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,180 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="haerbin-01__systerm confirm-control"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="360px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<div class="context">
|
||||
<template v-for="(message,index) in messages">
|
||||
<span :key="index">{{ message }}</span>
|
||||
</template>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('global.confirm') }}</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="haerbin-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'ConfirmTrain',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operate: {},
|
||||
messages: '',
|
||||
operation: null
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
if (this.operation === OperationEvent.Train.addTrainId.menu.operation) {
|
||||
return this.$t('menu.menuTrain.addTrainId');
|
||||
} else if (this.operation === OperationEvent.Train.editTrainId.menu.operation) {
|
||||
return this.$t('menu.menuTrain.editTrainId');
|
||||
} else if (this.operation === OperationEvent.Train.delTrainId.menu.operation) {
|
||||
return this.$t('menu.menuTrain.deleteTrainId');
|
||||
} else if (this.operation === OperationEvent.Train.moveTrainId.menu.operation) {
|
||||
return this.$t('menu.menuTrain.moveTrainId');
|
||||
} else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) {
|
||||
return this.$t('menu.menuTrain.switchTrainId');
|
||||
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
|
||||
return this.$t('menu.menuTrain.editTrainNo');
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation === OperationEvent.Train.addTrainId.menu.operation) {
|
||||
/** 添加列车识别号*/
|
||||
return OperationEvent.Train.addTrainId.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Train.editTrainId.menu.operation) {
|
||||
/** 修改列车识别号*/
|
||||
return OperationEvent.Train.editTrainId.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Train.delTrainId.menu.operation) {
|
||||
/** 删除列车识别号*/
|
||||
return OperationEvent.Train.delTrainId.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Train.moveTrainId.menu.operation) {
|
||||
/** 移动列车识别号*/
|
||||
return OperationEvent.Train.moveTrainId.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) {
|
||||
/** 交换列车识别号*/
|
||||
return OperationEvent.Train.switchTrainId.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
|
||||
/** 修改车组号*/
|
||||
return OperationEvent.Train.editTrainNo.confirm.domId;
|
||||
}
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
this.operate = operate || {};
|
||||
this.messages = operate.messages;
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
if (this.operation === OperationEvent.Train.addTrainId.menu.operation) {
|
||||
this.routeSetting();
|
||||
} else if (this.operation === OperationEvent.Train.editTrainId.menu.operation) {
|
||||
this.routeSetting();
|
||||
} else if (this.operation === OperationEvent.Train.delTrainId.menu.operation) {
|
||||
this.routeSetting();
|
||||
} else if (this.operation === OperationEvent.Train.moveTrainId.menu.operation) {
|
||||
this.routeSetting();
|
||||
} else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) {
|
||||
this.routeSetting();
|
||||
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
|
||||
this.routeSetting();
|
||||
}
|
||||
},
|
||||
// 进路设置
|
||||
routeSetting() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Train.addTrainId.confirm.operation,
|
||||
cmdType: CMD.Train.CMD_ADD_TRAIN_ID
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.confirm-control .context {
|
||||
padding-bottom: 40px !important;
|
||||
border: 1px solid lightgray;
|
||||
}
|
||||
</style>
|
450
src/jmapNew/theme/nanjing_02/menus/dialog/routeCmdControl.vue
Normal file
450
src/jmapNew/theme/nanjing_02/menus/dialog/routeCmdControl.vue
Normal file
@ -0,0 +1,450 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="haerbin-01__systerm route-cmd-control"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="840px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div style="padding: 10px 20px; border: 1px solid lightgray;">
|
||||
<span class="base-label">{{ $t('menu.commandInformation') }}</span>
|
||||
<el-form label-position="center" size="mini">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="this.$t('menu.type')" label-width="40px">
|
||||
<el-select v-model="operation" size="small" disabled>
|
||||
<el-option
|
||||
v-for="option in typeList"
|
||||
:key="option.code"
|
||||
:label="option.name"
|
||||
:value="option.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="this.$t('menu.stationName')" label-width="80px">
|
||||
<el-input v-model="stationName" size="small" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="this.$t('menu.signalName')" label-width="100px">
|
||||
<el-input v-model="signalName" size="small" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-table
|
||||
ref="tempData"
|
||||
class="table"
|
||||
:data="tempData"
|
||||
border
|
||||
style="width: 100%"
|
||||
size="mini"
|
||||
highlight-current-row
|
||||
height="200"
|
||||
>
|
||||
<el-table-column prop="order" :width="110" :label="this.$t('menu.serialNumber2')" />
|
||||
<el-table-column prop="date" :width="160" :label="this.$t('menu.time')" />
|
||||
<el-table-column prop="context" :width="180" :label="this.$t('menu.implementationProcess')" />
|
||||
<el-table-column prop="result" :label="this.$t('menu.executionResult')" />
|
||||
</el-table>
|
||||
<span class="notice">{{ message }}</span>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="2" :offset="3">
|
||||
<el-button :id="domIdCommand" type="primary" :disabled="cmdDisabled[0]" @click="command">{{ $t('menu.release') }}<span
|
||||
v-show="timeCountCommand>0"
|
||||
>({{ timeCountCommand }})</span></el-button>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="1">
|
||||
<el-button :id="domIdConfirm1" style="width:120px;" type="primary" :disabled="cmdDisabled[1]" @click="confirm1">{{ $t('menu.firstConfirm') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="2">
|
||||
<el-button :id="domIdConfirm2" type="primary" style="width:120px;" :disabled="cmdDisabled[2]" @click="confirm2">{{ $t('menu.secondConfirm') }}<span
|
||||
v-show="timeCountConfirm>0"
|
||||
>({{ timeCountConfirm }})</span></el-button>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="2">
|
||||
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">{{ $t('menu.suspend') }}</el-button>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="1">
|
||||
<el-button :id="domIdClose" @click="close">{{ $t('global.close') }}</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
<confirm-signal-unlock ref="confirmSignalUnlock" @setOperate="getOperate" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { now } from '@/utils/date';
|
||||
import ConfirmSignalUnlock from './childDialog/confirmSignalUnlock';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'RouteCmdControl',
|
||||
components: {
|
||||
ConfirmSignalUnlock
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
backOperate: '',
|
||||
selected: '',
|
||||
order: 0,
|
||||
row: null,
|
||||
timer: null,
|
||||
operation: '',
|
||||
cmdDisabled: [true, true, true],
|
||||
stpDisabled: true,
|
||||
tempData: [],
|
||||
message: '',
|
||||
timeCountCommand: -1,
|
||||
timeCountConfirm: -1,
|
||||
stationName: '',
|
||||
signalName: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
typeList() {
|
||||
return [
|
||||
{ code: OperationEvent.Signal.unlock.menu.operation, name: this.$t('menu.menuSignal.signalDeblock') },
|
||||
{ code: OperationEvent.Signal.guide.menu.operation, name: this.$t('menu.menuSignal.guideRouteHandle') }
|
||||
];
|
||||
},
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCommand() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
||||
/** 信号解封*/
|
||||
return OperationEvent.Signal.unlock.order.domId;
|
||||
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
|
||||
/** 办理引导进路*/
|
||||
return OperationEvent.Signal.guide.order.domId;
|
||||
}
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdConfirm1() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
||||
/** 信号解封*/
|
||||
return OperationEvent.Signal.unlock.confirm1.domId;
|
||||
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
|
||||
/** 办理引导进路*/
|
||||
return OperationEvent.Signal.guide.confirm1.domId;
|
||||
}
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdConfirm2() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
||||
/** 信号解封*/
|
||||
return OperationEvent.Signal.unlock.confirm2.domId;
|
||||
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
|
||||
/** 办理引导进路*/
|
||||
return OperationEvent.Signal.guide.confirm2.domId;
|
||||
}
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdStop() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
||||
/** 信号解封*/
|
||||
return OperationEvent.Signal.unlock.stop.domId;
|
||||
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
|
||||
/** 办理引导进路*/
|
||||
return OperationEvent.Signal.guide.stop.domId;
|
||||
}
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdClose() {
|
||||
if (this.dialogShow) {
|
||||
return OperationEvent.Command.close.menu.domId;
|
||||
}
|
||||
return '';
|
||||
},
|
||||
title() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
||||
return '信号解封';
|
||||
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
|
||||
return '办理引导进路';
|
||||
}
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
cmdDisabled: {
|
||||
handler(val, oldVal) {
|
||||
this.stpDisabled = true;
|
||||
val.forEach((elem, index) => {
|
||||
// 在确定1之前的操作才可以终止
|
||||
if (elem == false && index >= 1 && index <= 2) {
|
||||
this.stpDisabled = false;
|
||||
}
|
||||
});
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
this.timer = setInterval(() => {
|
||||
if (!this.$store.state.menuOperation.break) {
|
||||
if (this.timeCountCommand > 0) {
|
||||
this.timeCountCommand--;
|
||||
} else if (this.timeCountCommand == 0) {
|
||||
this.setButtonEnable({ step: 0 });
|
||||
this.timeCountCommand = -1;
|
||||
}
|
||||
if (this.timeCountConfirm > 0) {
|
||||
this.timeCountConfirm--;
|
||||
} else if (this.timeCountConfirm == 0) {
|
||||
this.setButtonEnable({ step: 0 });
|
||||
this.timeCountConfirm = -1;
|
||||
}
|
||||
}
|
||||
}, 1000);
|
||||
},
|
||||
beforeDestroy() {
|
||||
clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
if (!this.dialogShow) {
|
||||
this.signalName = '';
|
||||
this.stationName = '';
|
||||
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
|
||||
this.signalName = selected.name;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
this.selected = selected;
|
||||
}
|
||||
|
||||
this.order = 0;
|
||||
this.operation = operate.operation;
|
||||
|
||||
this.tempData = [];
|
||||
this.timeCountCommand = -1;
|
||||
this.timeCountConfirm = -1;
|
||||
this.cmdDisabled = [false, true, true];
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.stpDisabled = true;
|
||||
this.setMessage(this.$t('tip.releaseTip'));
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
command() {
|
||||
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
||||
/** 第一步带弹框处理*/
|
||||
this.commandHasPopUp();
|
||||
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
|
||||
/** 第一步不带弹框处理*/
|
||||
this.commandNoPopUp();
|
||||
}
|
||||
},
|
||||
commandHasPopUp() {
|
||||
const operate = {
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
||||
/** 信号解封*/
|
||||
operate.operation = OperationEvent.Signal.unlock.order.operation;
|
||||
}
|
||||
|
||||
this.setMessage(this.$t('tip.firstConfirmTip'));
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: '' });
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
||||
this.$refs.confirmSignalUnlock.doShow(operate, this.selected);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
commandNoPopUp() {
|
||||
const operate = {
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Signal.guide.menu.operation) {
|
||||
/** 办理引导进路*/
|
||||
operate.operation = OperationEvent.Signal.guide.order.operation;
|
||||
}
|
||||
|
||||
this.setMessage(this.$t('tip.firstConfirmTip'));
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: '' });
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.setButtonEnable({ step: 1 });
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.executionSucceed') });
|
||||
} else {
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.executionFailed') });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.executionException') });
|
||||
});
|
||||
},
|
||||
confirm1() {
|
||||
const operate = {
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
||||
/** 信号解封*/
|
||||
operate.operation = OperationEvent.Signal.unlock.confirm1.operation;
|
||||
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
|
||||
/** 办理引导进路*/
|
||||
operate.operation = OperationEvent.Signal.guide.confirm1.operation;
|
||||
}
|
||||
|
||||
this.setMessage(this.$t('tip.secondConfirmTip'));
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: '' });
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.timeCountCommand = -1;
|
||||
this.timeCountConfirm = 10;
|
||||
this.setButtonEnable({ step: 2 });
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: this.$t('tip.executionSucceed') });
|
||||
} else {
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: this.$t('tip.executionFailed') });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: this.$t('tip.executionException') });
|
||||
});
|
||||
},
|
||||
confirm2() {
|
||||
const operate = {
|
||||
over: true
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
||||
/** 信号解封*/
|
||||
operate.operation = OperationEvent.Signal.unlock.confirm2.operation;
|
||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_UNBLOCK;
|
||||
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
|
||||
/** 办理引导进路*/
|
||||
operate.operation = OperationEvent.Signal.guide.confirm2.operation;
|
||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE;
|
||||
}
|
||||
this.setMessage('');
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: '' });
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.timeCountCommand = -1;
|
||||
this.timeCountConfirm = -1;
|
||||
this.setButtonEnable({ step: -1 });
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: this.$t('tip.executionSucceed') });
|
||||
} else {
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: this.$t('tip.executionFailed') });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.timeCountCommand = -1;
|
||||
this.timeCountConfirm = -1;
|
||||
this.setButtonEnable({ step: -1 });
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: this.$t('tip.executionException') });
|
||||
});
|
||||
},
|
||||
stop() {
|
||||
const operate = {
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
||||
/** 信号解封*/
|
||||
operate.operation = OperationEvent.Signal.unlock.stop.operation;
|
||||
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
|
||||
/** 办理引导进路*/
|
||||
operate.operation = OperationEvent.Signal.guide.stop.operation;
|
||||
}
|
||||
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSuspend'), result: '' });
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.setButtonEnable({ step: 0 });
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSuspend'), result: this.$t('tip.executionSucceed') });
|
||||
} else {
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSuspend'), result: this.$t('tip.executionFailed') });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSuspend'), result: this.$t('tip.executionException') });
|
||||
});
|
||||
},
|
||||
close() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.close.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
},
|
||||
getOperate(operate) {
|
||||
/** 弹框返回值处理*/
|
||||
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
||||
/** 信号解封*/
|
||||
this.backOperate = operate;
|
||||
this.setButtonEnable(operate);
|
||||
if (operate.success) {
|
||||
this.timeCountCommand = 30;
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.confirmedSuccess') });
|
||||
} else {
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.cancelSuccess') });
|
||||
}
|
||||
}
|
||||
},
|
||||
setButtonEnable(param) {
|
||||
this.cmdDisabled = [true, true, true];
|
||||
if (param && param.step >= 0) {
|
||||
this.cmdDisabled[param.step] = false;
|
||||
}
|
||||
},
|
||||
setMessage(message) {
|
||||
this.message = message;
|
||||
},
|
||||
writeRecord(param) {
|
||||
this.tempData.push(param);
|
||||
},
|
||||
editRecord(param) {
|
||||
this.tempData.forEach(elem => {
|
||||
if (elem.order == param.order) {
|
||||
for (var prop in param) {
|
||||
elem[prop] = param[prop];
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
166
src/jmapNew/theme/nanjing_02/menus/dialog/routeDetail.vue
Normal file
166
src/jmapNew/theme/nanjing_02/menus/dialog/routeDetail.vue
Normal file
@ -0,0 +1,166 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="haerbin-01__systerm route-detail"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="340px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row class="header">
|
||||
<el-col :span="10"><span>{{ $t('menu.stationName') }}</span></el-col>
|
||||
<el-col :span="10" :offset="2"><span>{{ $t('menu.startSignal') }}</span></el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-input v-model="stationName" size="small" disabled />
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-input v-model="signalName" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="table">
|
||||
<span>{{ $t('menu.routeList') }}</span>
|
||||
<el-table
|
||||
ref="tempTable"
|
||||
:data="tempData"
|
||||
border
|
||||
style="width: 100%"
|
||||
size="mini"
|
||||
highlight-current-row
|
||||
:height="140"
|
||||
>
|
||||
<el-table-column :label="this.$t('menu.route')">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="status" :label="this.$t('menu.controlState')" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.controlType == '01'">{{ $t('menu.automatic') }}</span>
|
||||
<span v-else>{{ $t('menu.artificial') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('global.confirm') }}</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="haerbin-01__systerm" />
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'RouteDetail',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
tempData: [],
|
||||
stationName: '',
|
||||
signalName: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'signalList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Signal.detail.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return this.$t('menu.queryAccessControlMode');
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected, tempData) {
|
||||
// 如果不是因为断点激活则需要,初始化菜单初始值
|
||||
if (!this.dialogShow) {
|
||||
this.signalName = '';
|
||||
this.stationName = '';
|
||||
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
|
||||
this.signalName = selected.name;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
}
|
||||
this.tempData = tempData || [];
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Signal.detail.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_STAND_VIEW_STATUS
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
309
src/jmapNew/theme/nanjing_02/menus/dialog/routeHandControl.vue
Normal file
309
src/jmapNew/theme/nanjing_02/menus/dialog/routeHandControl.vue
Normal file
@ -0,0 +1,309 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="haerbin-01__systerm route-hand-control"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="360px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row class="header">
|
||||
<el-col :span="10"><span>{{ $t('menu.stationName') }}</span></el-col>
|
||||
<el-col :span="10" :offset="2"><span>{{ $t('menu.startSignal') }}</span></el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-input v-model="stationName" size="small" disabled />
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-input v-model="signalName" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="table">
|
||||
<span>{{ $t('menu.routeList') }}</span>
|
||||
<el-table
|
||||
ref="tempTable"
|
||||
:data="tempData"
|
||||
border
|
||||
style="width: 100%"
|
||||
size="mini"
|
||||
highlight-current-row
|
||||
:height="140"
|
||||
>
|
||||
<el-table-column :id="domIdChoose" :label="this.$t('menu.route')" style="margin-left:30px">
|
||||
<template slot-scope="scope">
|
||||
<!-- <el-checkbox v-model="scope.row.check" :disabled="scope.row.disabled" /> -->
|
||||
<el-checkbox
|
||||
v-model="changeList[scope.$index]"
|
||||
:disabled="scope.row.disabled"
|
||||
@change="changeCheck(changeList[scope.$index],scope.row.code)"
|
||||
/>
|
||||
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="controlType" :label="this.$t('menu.controlState')" :width="80">
|
||||
<template slot-scope="scope">
|
||||
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">
|
||||
<span v-if="scope.row.controlType == '01'">{{ $t('menu.automatic2') }}</span>
|
||||
<span v-else>{{ $t('menu.artificial') }}</span>
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="conflictCheck" :label="this.$t('menu.conflictCheck')" :width="80">
|
||||
<template slot-scope="scope">
|
||||
<span
|
||||
:style="{color: scope.row.disabled ? '#CBCBCB':'unset'}"
|
||||
>{{ scope.row.conflictCheck }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button
|
||||
:id="domIdConfirm"
|
||||
type="primary"
|
||||
:disabled="commitDisabled"
|
||||
:loading="loading"
|
||||
@click="commit"
|
||||
>{{ $t('global.confirm') }}</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<confirm-control ref="confirmControl" />
|
||||
<notice-info ref="noticeInfo" pop-class="haerbin-01__systerm" />
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import ConfirmControl from './childDialog/confirmControl';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'RouteHandControl',
|
||||
components: {
|
||||
ConfirmControl,
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
selected: null,
|
||||
tempData: [],
|
||||
operation: null,
|
||||
selection: [],
|
||||
stationName: '',
|
||||
signalName: '',
|
||||
changeList:[],
|
||||
commitDisabled: true
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'signalList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdChoose() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
|
||||
return OperationEvent.Signal.humanControl.choose.domId;
|
||||
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
|
||||
return OperationEvent.Signal.atsAutoControl.choose.domId;
|
||||
}
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
||||
},
|
||||
title() {
|
||||
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
|
||||
return this.$t('menu.menuSignal.humanControl');
|
||||
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
|
||||
return this.$t('menu.menuSignal.atsAutoControl');
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected, tempData) {
|
||||
this.selected = selected;
|
||||
this.changeList = [];
|
||||
this.commitDisabled = true;
|
||||
this.selection = [];
|
||||
// 如果不是断点激活,而是第一次显示则初始化
|
||||
if (!this.dialogShow) {
|
||||
this.signalName = '';
|
||||
this.stationName = '';
|
||||
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
|
||||
this.signalName = selected.name;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
}
|
||||
|
||||
if (tempData && tempData.length > 0) {
|
||||
tempData.forEach(elem => {
|
||||
this.changeList.push(false);
|
||||
elem.disabled = false;
|
||||
// atsControl 1 自动控制 0 人工控制
|
||||
// 设置禁用状态
|
||||
if (operate.operation === OperationEvent.Signal.humanControl.menu.operation &&
|
||||
(elem.atsControl == '0')) {
|
||||
elem.disabled = true;
|
||||
} if (operate.operation === OperationEvent.Signal.atsAutoControl.menu.operation &&
|
||||
(elem.atsControl == '1')) {
|
||||
elem.disabled = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
this.tempData = tempData || [];
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$refs.tempTable.setCurrentRow();
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
changeCheck(check, code) {
|
||||
if (check) {
|
||||
this.selection.push(code);
|
||||
} else {
|
||||
this.selection.splice(this.selection.indexOf(code), 1);
|
||||
}
|
||||
if (this.selection.length > 0) {
|
||||
this.commitDisabled = false;
|
||||
this.handleChooseChange();
|
||||
} else {
|
||||
this.commitDisabled = true;
|
||||
}
|
||||
},
|
||||
handleChooseChange() {
|
||||
const codeList = this.selection.map(elem => { return elem; });
|
||||
if (codeList && codeList.length) {
|
||||
const operate = {
|
||||
operation: '',
|
||||
val: codeList.join('::')
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
|
||||
/** 自排关*/
|
||||
operate.operation = OperationEvent.Signal.humanControl.choose.operation;
|
||||
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
|
||||
/** 自排开*/
|
||||
operate.operation = OperationEvent.Signal.atsAutoControl.choose.operation;
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
});
|
||||
} else if (!this.selection) {
|
||||
this.$messageBox(this.$t('tip.selectAPieceOfData'));
|
||||
}
|
||||
},
|
||||
commit() {
|
||||
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
|
||||
/** 自排关*/
|
||||
this.humanControl();
|
||||
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
|
||||
/** 自排开*/
|
||||
this.atsAutoControl();
|
||||
}
|
||||
},
|
||||
// 自排关
|
||||
humanControl() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Signal.humanControl.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING,
|
||||
param:{
|
||||
routeCodeList:this.selection
|
||||
}
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 自排开
|
||||
atsAutoControl() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Signal.atsAutoControl.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING,
|
||||
param:{
|
||||
routeCodeList:this.selection
|
||||
}
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
168
src/jmapNew/theme/nanjing_02/menus/dialog/routeLock.vue
Normal file
168
src/jmapNew/theme/nanjing_02/menus/dialog/routeLock.vue
Normal file
@ -0,0 +1,168 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="haerbin-01__systerm route-lock"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="340px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row class="header">
|
||||
<el-col :span="10"><span>{{ $t('menu.stationName') }}</span></el-col>
|
||||
<el-col :span="10" :offset="2"><span>{{ $t('menu.signalName') }}</span></el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-input v-model="stationName" size="small" disabled />
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-input v-model="signalName" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="table">
|
||||
<span>{{ $t('menu.listOfSignalButtons') }}</span>
|
||||
<el-table
|
||||
ref="table"
|
||||
:data="tempData"
|
||||
border
|
||||
style="width: 100%"
|
||||
size="mini"
|
||||
highlight-current-row
|
||||
:height="140"
|
||||
>
|
||||
<el-table-column prop="name" :label="this.$t('menu.buttonName')" />
|
||||
<el-table-column prop="status" :label="this.$t('menu.buttonStatus')" />
|
||||
</el-table>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('global.confirm') }}</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="haerbin-01__systerm" />
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'RouteLock',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
tempData: [],
|
||||
operate: null,
|
||||
stationName: '',
|
||||
signalName: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'signalList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Signal.lock.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '封锁信号';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
// 入股不是断点激活,而是第一次显示需要初始化
|
||||
if (!this.dialogShow) {
|
||||
this.signalName = '';
|
||||
this.stationName = '';
|
||||
|
||||
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
|
||||
this.signalName = selected.name;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
}
|
||||
|
||||
/** status 04:封锁*/
|
||||
const signal = selected;
|
||||
this.tempData = [{ code: selected.code, name: selected.name, status: signal.blockade ? this.$t('menu.blocked') : this.$t('menu.unblocked') }];
|
||||
const timer = setInterval(() => {
|
||||
if (this.$refs.table) {
|
||||
this.$refs.table.setCurrentRow(this.tempData[0]);
|
||||
clearInterval(timer);
|
||||
}
|
||||
}, 300);
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Signal.lock.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_BLOCK
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
219
src/jmapNew/theme/nanjing_02/menus/dialog/routeSelection.vue
Normal file
219
src/jmapNew/theme/nanjing_02/menus/dialog/routeSelection.vue
Normal file
@ -0,0 +1,219 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag class="haerbin-01__systerm route-setting" :title="title" :visible.sync="show" width="350px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||
<el-row class="header">
|
||||
<el-col :span="8"><span>{{ $t('menu.stationName') }}</span></el-col>
|
||||
<el-col :span="8" :offset="2"><span>{{ $t('menu.startSignal') }}</span></el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-input v-model="stationName" size="small" disabled />
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="2">
|
||||
<el-input v-model="signalName" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-table ref="table" :data="tempData" border style="width: 100%; margin-top:10px" size="mini" height="120" highlight-current-row @row-click="clickEvent">
|
||||
<el-table-column :id="domIdChoose" prop="name" :label="this.$t('menu.route')" style="margin-left:30px" />
|
||||
</el-table>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button
|
||||
:id="domIdConfirm"
|
||||
type="primary"
|
||||
:loading="loading"
|
||||
:disabled="commitDisabled"
|
||||
@click="commit"
|
||||
>{{ $t('global.confirm') }}</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="haerbin-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import { deepAssign } from '@/utils/index';
|
||||
|
||||
export default {
|
||||
name: 'RouteSelection',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tempData: [],
|
||||
beforeSectionList: [],
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
selected: null,
|
||||
row: null,
|
||||
operation: '',
|
||||
display: true,
|
||||
stationName: '',
|
||||
signalName: '',
|
||||
tableStyle: {
|
||||
'border-bottom': 'none'
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdChoose() {
|
||||
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.choose.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return this.$t('menu.menuSignal.routeSelect');
|
||||
},
|
||||
commitDisabled() {
|
||||
let disabled = true;
|
||||
if (this.row) {
|
||||
disabled = !this.row.canSetting;
|
||||
}
|
||||
return disabled;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected, tempData) {
|
||||
this.selected = selected;
|
||||
// 如果不是断点激活,而是第一次显示,则需要设置初始值
|
||||
if (!this.dialogShow) {
|
||||
this.signalName = '';
|
||||
this.stationName = '';
|
||||
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
|
||||
this.signalName = selected.name;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
}
|
||||
|
||||
this.tempData = tempData || [];
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.restoreBeforeDevices();
|
||||
this.$refs.table.setCurrentRow();
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
restoreBeforeDevices() {
|
||||
// 恢复之前选中设备
|
||||
if (this.beforeSectionList && this.beforeSectionList.length) {
|
||||
this.beforeSectionList.forEach(elem => {
|
||||
elem.cutOff = false;
|
||||
});
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/updateMapState', [... this.beforeSectionList]);
|
||||
this.beforeSectionList = [];
|
||||
},
|
||||
clickEvent(row, event, column) {
|
||||
this.row = row;
|
||||
if (row) {
|
||||
// 恢复进路区段的切除状态
|
||||
this.row.canSetting = true;
|
||||
this.restoreBeforeDevices();
|
||||
const containSectionList = [];
|
||||
if (!row.setting) {
|
||||
// 设置选中区段为切除状态
|
||||
if (row.routeSectionList && row.routeSectionList.length) {
|
||||
row.routeSectionList.forEach(elem => {
|
||||
const section = deepAssign({}, this.$store.getters['map/getDeviceByCode'](elem));
|
||||
if (section.logicSectionCodeList && section.logicSectionCodeList.length) {
|
||||
section.logicSectionCodeList.forEach(item => {
|
||||
const sec = deepAssign({}, this.$store.getters['map/getDeviceByCode'](item));
|
||||
sec.cutOff = true;
|
||||
containSectionList.push(sec);
|
||||
});
|
||||
} else {
|
||||
section.cutOff = true;
|
||||
containSectionList.push(section);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/updateMapState', [...containSectionList]);
|
||||
this.beforeSectionList = containSectionList || [];
|
||||
|
||||
// 设置选中指令
|
||||
const operate = {
|
||||
operation: OperationEvent.Signal.arrangementRoute.choose.operation,
|
||||
val: row.code,
|
||||
param: {
|
||||
routeCode: row.code
|
||||
}
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
commit() {
|
||||
if (this.row && this.row.canSetting) {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Signal.arrangementRoute.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE,
|
||||
param: {
|
||||
routeCode: this.row.code
|
||||
}
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
}
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
419
src/jmapNew/theme/nanjing_02/menus/dialog/sectionCmdControl.vue
Normal file
419
src/jmapNew/theme/nanjing_02/menus/dialog/sectionCmdControl.vue
Normal file
@ -0,0 +1,419 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog v-dialogDrag class="haerbin-01__systerm section-cmd-control" :title="title" :visible.sync="show" width="840px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||
<div style="padding: 10px 20px; border: 1px solid lightgray;">
|
||||
<span class="base-label">{{ $t('menu.commandInformation') }}</span>
|
||||
<el-form label-position="center" size="mini">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="this.$t('global.status')" label-width="40px">
|
||||
<el-select v-model="operation" size="small" disabled>
|
||||
<el-option v-for="option in typeList" :key="option.code" :label="option.name" :value="option.code" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="this.$t('menu.stationName')" label-width="80px">
|
||||
<el-input v-model="stationName" size="small" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="this.$t('menu.sectionName')" label-width="100px">
|
||||
<el-input v-model="sectionName" size="small" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-table :data="tempData" border style="width: 100%" size="mini" highlight-current-row height="200">
|
||||
<el-table-column prop="order" :width="110" :label="this.$t('menu.serialNumber2')" />
|
||||
<el-table-column prop="date" :width="160" :label="this.$t('menu.time')" />
|
||||
<el-table-column prop="context" :width="180" :label="this.$t('menu.implementationProcess')" />
|
||||
<el-table-column prop="result" :label="this.$t('menu.executionResult')" />
|
||||
</el-table>
|
||||
<span class="notice">{{ message }}</span>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="2" :offset="3">
|
||||
<el-button :id="domIdCommand" type="primary" :disabled="cmdDisabled[0]" @click="command">
|
||||
{{ $t('menu.release') }}
|
||||
<span v-show="timeCountCommand>0">({{ timeCountCommand }})</span></el-button>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="1">
|
||||
<el-button :id="domIdConfirm1" type="primary" style="width:120px;" :disabled="cmdDisabled[1]" @click="confirm1">{{ $t('menu.firstConfirm') }}</el-button>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="2">
|
||||
<el-button :id="domIdConfirm2" type="primary" style="width:120px;" :disabled="cmdDisabled[2]" @click="confirm2">
|
||||
{{ $t('menu.secondConfirm') }}
|
||||
<span v-show="timeCountConfirm>0">({{ timeCountConfirm }})</span></el-button>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="2">
|
||||
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">{{ $t('menu.suspend') }}</el-button>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="1">
|
||||
<el-button :id="domIdClose" @click="close">{{ $t('global.close') }}</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { now } from '@/utils/date';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'SectionCmdControl',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
backOperate: '',
|
||||
selected: '',
|
||||
order: 0,
|
||||
row: null,
|
||||
timer: null,
|
||||
operation: '',
|
||||
cmdDisabled: [true, true, true],
|
||||
stpDisabled: true,
|
||||
tempData: [],
|
||||
message: '',
|
||||
timeCountCommand: -1,
|
||||
timeCountConfirm: -1,
|
||||
stationName: '',
|
||||
sectionName: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
typeList() {
|
||||
return [
|
||||
{ code: OperationEvent.Section.unlock.menu.operation, name: this.$t('menu.menuSection.sectionUnblock') },
|
||||
{ code: OperationEvent.Section.fault.menu.operation, name: this.$t('menu.menuSection.sectionFaultUnlock') },
|
||||
{ code: OperationEvent.Section.axlePreReset.menu.operation, name: this.$t('menu.menuSection.sectionAxisPreReset') }
|
||||
];
|
||||
},
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCommand() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
||||
return OperationEvent.Section.unlock.order.domId; // 区段解封
|
||||
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
||||
return OperationEvent.Section.fault.order.domId; // 区段故障解锁
|
||||
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
|
||||
return OperationEvent.Section.axlePreReset.order.domId; // 区段计轴预复位
|
||||
}
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdConfirm1() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
||||
return OperationEvent.Section.unlock.confirm1.domId; // 区段解封
|
||||
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
||||
return OperationEvent.Section.fault.confirm1.domId; // 区段故障解锁
|
||||
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
|
||||
return OperationEvent.Section.axlePreReset.confirm1.domId; // 区段计轴预复位
|
||||
}
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdConfirm2() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
||||
/** 区段解封*/
|
||||
return OperationEvent.Section.unlock.confirm2.domId;
|
||||
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
||||
/** 区段故障解锁*/
|
||||
return OperationEvent.Section.fault.confirm2.domId;
|
||||
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
|
||||
/** 区段计轴预复位*/
|
||||
return OperationEvent.Section.axlePreReset.confirm2.domId;
|
||||
}
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdStop() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
||||
/** 区段解封*/
|
||||
return OperationEvent.Section.unlock.stop.domId;
|
||||
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
||||
/** 区段故障解锁*/
|
||||
return OperationEvent.Section.fault.stop.domId;
|
||||
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
|
||||
/** 区段计轴预复位*/
|
||||
return OperationEvent.Section.axlePreReset.stop.domId;
|
||||
}
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdClose() {
|
||||
if (this.dialogShow) {
|
||||
return OperationEvent.Command.close.menu.domId;
|
||||
}
|
||||
return '';
|
||||
},
|
||||
title() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
||||
return this.$t('menu.menuSection.sectionUnblock');
|
||||
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
||||
return this.$t('menu.menuSection.sectionFaultUnlock');
|
||||
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
|
||||
return this.$t('menu.menuSection.sectionAxisPreReset');
|
||||
}
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
cmdDisabled: {
|
||||
handler(val, oldVal) {
|
||||
this.stpDisabled = true;
|
||||
val.forEach((elem, index) => {
|
||||
// 在确定1之前的操作才可以终止
|
||||
if (elem == false && index >= 1 && index <= 2) {
|
||||
this.stpDisabled = false;
|
||||
}
|
||||
});
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
this.timer = setInterval(() => {
|
||||
if (!this.$store.state.menuOperation.break) {
|
||||
if (this.timeCountCommand > 0) {
|
||||
this.timeCountCommand--;
|
||||
} else if (this.timeCountCommand == 0) {
|
||||
this.setButtonEnable({ step: 0 });
|
||||
this.timeCountCommand = -1;
|
||||
}
|
||||
if (this.timeCountConfirm > 0) {
|
||||
this.timeCountConfirm--;
|
||||
} else if (this.timeCountConfirm == 0) {
|
||||
this.setButtonEnable({ step: 0 });
|
||||
this.timeCountConfirm = -1;
|
||||
}
|
||||
}
|
||||
}, 1000);
|
||||
},
|
||||
beforeDestroy() {
|
||||
clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
if (!this.dialogShow) {
|
||||
this.sectionName = '';
|
||||
this.stationName = '';
|
||||
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
|
||||
if (selected.type === '02') {
|
||||
const section = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
|
||||
if (section) {
|
||||
this.sectionName += section.name;
|
||||
}
|
||||
}
|
||||
this.sectionName += selected.name;
|
||||
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
this.selected = selected;
|
||||
}
|
||||
|
||||
this.order = 0;
|
||||
this.operation = operate.operation || '';
|
||||
this.dialogShow = true;
|
||||
this.tempData = [];
|
||||
this.timeCountCommand = -1;
|
||||
this.timeCountConfirm = -1;
|
||||
this.cmdDisabled = [false, true, true];
|
||||
}
|
||||
this.stpDisabled = true;
|
||||
this.setMessage(this.$t('tip.releaseTip'));
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
command() {
|
||||
if (this.operation == OperationEvent.Section.fault.menu.operation ||
|
||||
this.operation == OperationEvent.Section.unlock.menu.operation ||
|
||||
this.operation == OperationEvent.Section.cancelSpeed.menu.operation ||
|
||||
this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
|
||||
/** 第一步不带弹框处理*/
|
||||
this.commandNoPopUp();
|
||||
} else {
|
||||
/** 第一步带弹框处理*/
|
||||
this.commandHasPopUp();
|
||||
}
|
||||
},
|
||||
commandHasPopUp() {
|
||||
},
|
||||
commandNoPopUp() {
|
||||
const operate = {};
|
||||
|
||||
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
||||
/** 区段解封*/
|
||||
operate.operation = OperationEvent.Section.unlock.order.operation;
|
||||
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
||||
/** 区段故障解锁*/
|
||||
operate.operation = OperationEvent.Section.fault.order.operation;
|
||||
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
|
||||
/** 区段计轴预复位*/
|
||||
operate.operation = OperationEvent.Section.axlePreReset.order.operation;
|
||||
}
|
||||
|
||||
this.setMessage(this.$t('tip.firstConfirmTip'));
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: '' });
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.setButtonEnable({ step: 1 });
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.executionSucceed') });
|
||||
} else {
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.executionFailed') });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.executionException') });
|
||||
});
|
||||
},
|
||||
confirm1() {
|
||||
const operate = {
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
||||
/** 区段解封*/
|
||||
operate.operation = OperationEvent.Section.unlock.confirm1.operation;
|
||||
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
||||
/** 区段故障解锁*/
|
||||
operate.operation = OperationEvent.Section.fault.confirm1.operation;
|
||||
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
|
||||
/** 区段计轴预复位*/
|
||||
operate.operation = OperationEvent.Section.axlePreReset.confirm1.operation;
|
||||
}
|
||||
|
||||
this.setMessage(this.$t('tip.secondConfirmTip'));
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: '' });
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.timeCountCommand = -1;
|
||||
this.timeCountConfirm = 10;
|
||||
this.setButtonEnable({ step: 2 });
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: this.$t('tip.executionSucceed') });
|
||||
} else {
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: this.$t('tip.executionFailed') });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: this.$t('tip.executionException') });
|
||||
});
|
||||
},
|
||||
confirm2() {
|
||||
const operate = {};
|
||||
|
||||
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
||||
/** 区段解封*/
|
||||
operate.operation = OperationEvent.Section.unlock.confirm2.operation;
|
||||
operate.cmdType = CMD.Section.CMD_SECTION_UNBLOCK;
|
||||
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
||||
/** 区段故障解锁*/
|
||||
operate.operation = OperationEvent.Section.fault.confirm2.operation;
|
||||
operate.cmdType = CMD.Section.CMD_SECTION_FAULT_UNLOCK;
|
||||
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
|
||||
/** 区段计轴预复位*/
|
||||
operate.operation = OperationEvent.Section.axlePreReset.confirm2.operation;
|
||||
operate.cmdType = CMD.Section.CMD_SECTION_AXIS_PRE_RESET;
|
||||
}
|
||||
|
||||
this.setMessage('');
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: '' });
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.timeCountCommand = -1;
|
||||
this.timeCountConfirm = -1;
|
||||
this.setButtonEnable({ step: -1 });
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: this.$t('tip.executionSucceed') });
|
||||
} else {
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: this.$t('tip.executionFailed') });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.timeCountCommand = -1;
|
||||
this.timeCountConfirm = -1;
|
||||
this.setButtonEnable({ step: -1 });
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: this.$t('tip.executionException') });
|
||||
});
|
||||
},
|
||||
stop() {
|
||||
const operate = {};
|
||||
|
||||
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
||||
/** 区段解封*/
|
||||
operate.operation = OperationEvent.Section.unlock.stop.operation;
|
||||
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
||||
/** 区段故障解锁*/
|
||||
operate.operation = OperationEvent.Section.fault.stop.operation;
|
||||
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
|
||||
/** 区段计轴预复位*/
|
||||
operate.operation = OperationEvent.Section.axlePreReset.stop.operation;
|
||||
}
|
||||
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSuspend'), result: '' });
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.setButtonEnable({ step: 0 });
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSuspend'), result: this.$t('tip.executionSucceed') });
|
||||
} else {
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSuspend'), result: this.$t('tip.executionFailed') });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSuspend'), result: this.$t('tip.executionException') });
|
||||
});
|
||||
},
|
||||
close() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.close.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
},
|
||||
setButtonEnable(param) {
|
||||
this.cmdDisabled = [true, true, true];
|
||||
if (param && param.step >= 0) {
|
||||
this.cmdDisabled[param.step] = false;
|
||||
}
|
||||
},
|
||||
setMessage(message) {
|
||||
this.message = message;
|
||||
},
|
||||
writeRecord(param) {
|
||||
this.tempData.push(param);
|
||||
},
|
||||
editRecord(param) {
|
||||
this.tempData.forEach(elem => {
|
||||
if (elem.order == param.order) {
|
||||
for (var prop in param) {
|
||||
elem[prop] = param[prop];
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
553
src/jmapNew/theme/nanjing_02/menus/dialog/speedCmdControl.vue
Normal file
553
src/jmapNew/theme/nanjing_02/menus/dialog/speedCmdControl.vue
Normal file
@ -0,0 +1,553 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog v-dialogDrag class="haerbin-01__systerm section-cmd-speed" :title="title" :visible.sync="show" width="840px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||
<div style="padding: 10px 20px; border: 1px solid lightgray;">
|
||||
<span class="base-label">{{ $t('menu.commandInformation') }}</span>
|
||||
<el-form label-position="center" size="mini">
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item :label="this.$t('menu.type')" label-width="40px">
|
||||
<el-select v-model="operation" size="small" disabled>
|
||||
<el-option v-for="option in typeList" :key="option.code" :label="option.name" :value="option.code" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item :label="this.$t('menu.stationName')" label-width="80px">
|
||||
<el-input v-model="stationName" size="small" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item :label="nameLabel" label-width="80px">
|
||||
<el-input v-model="name" size="small" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item :label="this.$t('menu.speedLimitValue')" label-width="80px">
|
||||
<el-select :id="domIdChoose" v-model="speed" size="small" :disabled="spdDisabled" @change="speedSelectChange">
|
||||
<!-- <el-option v-for="item in speedList" :key="item" :label="item" :value="item" /> -->
|
||||
<el-option v-for="item in speedList" :key="item.value" :label="item.name" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-table :data="tableData" border style="width: 100%" size="mini" highlight-current-row height="200">
|
||||
<el-table-column prop="order" :width="110" :label="this.$t('menu.serialNumber2')" />
|
||||
<el-table-column prop="date" :width="160" :label="this.$t('menu.time')" />
|
||||
<el-table-column prop="context" :width="180" :label="this.$t('menu.implementationProcess')" />
|
||||
<el-table-column prop="result" :label="this.$t('menu.executionResult')" />
|
||||
</el-table>
|
||||
<span class="notice">{{ message }}</span>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="2" :offset="3">
|
||||
<el-button :id="domIdCommand" type="primary" :disabled="cmdDisabled[0]" @click="command">
|
||||
{{ $t('menu.release') }}
|
||||
<span v-show="timeCountCommand>0">({{ timeCountCommand }})</span></el-button>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="1">
|
||||
<el-button :id="domIdConfirm1" type="primary" style="width:120px;" :disabled="cmdDisabled[1]" @click="confirm1">{{ $t('menu.firstConfirm') }}</el-button>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="2">
|
||||
<el-button :id="domIdConfirm2" type="primary" style="width:120px;" :disabled="cmdDisabled[2]" @click="confirm2">
|
||||
{{ $t('menu.secondConfirm') }}
|
||||
<span v-show="timeCountConfirm>0">({{ timeCountConfirm }})</span></el-button>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="2">
|
||||
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">{{ $t('menu.suspend') }}</el-button>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="1">
|
||||
<el-button :id="domIdClose" @click="close">{{ $t('global.close') }}</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
<confirm-control-speed ref="confirmControlSpeed" @setOperate="getOperate" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import ConfirmControlSpeed from './childDialog/confirmControlSpeed';
|
||||
import { now } from '@/utils/date';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'SectionCmdSpeed',
|
||||
components: {
|
||||
ConfirmControlSpeed
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
backOperate: '',
|
||||
selected: '',
|
||||
order: 0,
|
||||
row: null,
|
||||
timer: null,
|
||||
operation: '',
|
||||
cmdDisabled: [true, true, true],
|
||||
spdDisabled: false,
|
||||
stpDisabled: true,
|
||||
tableData: [],
|
||||
message: '',
|
||||
timeCountCommand: -1,
|
||||
timeCountConfirm: -1,
|
||||
maxSpeed: 80,
|
||||
speedSpace: 5,
|
||||
stationName: '',
|
||||
name: '',
|
||||
speed: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
nameLabel() {
|
||||
if (this.operation == OperationEvent.Section.setSpeed.menu.operation ||
|
||||
this.operation == OperationEvent.Section.cancelSpeed.menu.operation) {
|
||||
return this.$t('menu.sectionName');
|
||||
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation ||
|
||||
this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
|
||||
return this.$t('menu.switchName');
|
||||
}
|
||||
return null;
|
||||
},
|
||||
speedList() {
|
||||
const list = [{ name: '不限速', value: '-1' }];
|
||||
for (var i = 0; i * this.speedSpace <= this.maxSpeed; i++) {
|
||||
const speed = String(i * this.speedSpace);
|
||||
list.push({ name: speed, value: speed });
|
||||
}
|
||||
return list;
|
||||
},
|
||||
typeList() {
|
||||
return [
|
||||
{ code: OperationEvent.Section.setSpeed.menu.operation, name: this.$t('menu.menuSection.sectionSetSpeedLimit') },
|
||||
{ code: OperationEvent.Section.cancelSpeed.menu.operation, name: this.$t('menu.menuSection.sectionCancelSpeedLimit') },
|
||||
{ code: OperationEvent.Switch.setSpeed.menu.operation, name: this.$t('menu.turnoutSettingSpeedLimit') },
|
||||
{ code: OperationEvent.Switch.cancelSpeed.menu.operation, name: this.$t('menu.turnoutCancelsSpeedLimit') }
|
||||
];
|
||||
},
|
||||
title() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
|
||||
return this.$t('menu.menuSection.sectionSetSpeedLimit');
|
||||
} else if (this.operation == OperationEvent.Section.cancelSpeed.menu.operation) {
|
||||
return this.$t('menu.menuSection.sectionCancelSpeedLimit');
|
||||
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation) {
|
||||
return this.$t('menu.turnoutSettingSpeedLimit');
|
||||
} else if (this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
|
||||
return this.$t('menu.turnoutCancelsSpeedLimit');
|
||||
}
|
||||
}
|
||||
return null;
|
||||
},
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdChoose() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
|
||||
/** 区段设置限速*/
|
||||
return OperationEvent.Section.setSpeed.choose.domId;
|
||||
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation) {
|
||||
/** 道岔设置限速*/
|
||||
return OperationEvent.Switch.setSpeed.choose.domId;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
},
|
||||
domIdCommand() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
|
||||
/** 区段设置限速*/
|
||||
return OperationEvent.Section.setSpeed.order.domId;
|
||||
} else if (this.operation == OperationEvent.Section.cancelSpeed.menu.operation) {
|
||||
/** 区段取消限速*/
|
||||
return OperationEvent.Section.cancelSpeed.order.domId;
|
||||
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation) {
|
||||
/** 道岔设置限速*/
|
||||
return OperationEvent.Switch.setSpeed.order.domId;
|
||||
} else if (this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
|
||||
/** 道岔取消限速*/
|
||||
return OperationEvent.Switch.cancelSpeed.order.domId;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
},
|
||||
domIdConfirm1() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
|
||||
/** 区段设置限速*/
|
||||
return OperationEvent.Section.setSpeed.confirm1.domId;
|
||||
} else if (this.operation == OperationEvent.Section.cancelSpeed.menu.operation) {
|
||||
/** 区段取消限速*/
|
||||
return OperationEvent.Section.cancelSpeed.confirm1.domId;
|
||||
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation) {
|
||||
/** 道岔设置限速*/
|
||||
return OperationEvent.Switch.setSpeed.confirm1.domId;
|
||||
} else if (this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
|
||||
/** 道岔取消限速*/
|
||||
return OperationEvent.Switch.cancelSpeed.confirm1.domId;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
},
|
||||
domIdConfirm2() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
|
||||
/** 区段设置限速*/
|
||||
return OperationEvent.Section.setSpeed.confirm2.domId;
|
||||
} else if (this.operation == OperationEvent.Section.cancelSpeed.menu.operation) {
|
||||
/** 区段取消限速*/
|
||||
return OperationEvent.Section.cancelSpeed.confirm2.domId;
|
||||
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation) {
|
||||
/** 道岔设置限速*/
|
||||
return OperationEvent.Switch.setSpeed.confirm2.domId;
|
||||
} else if (this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
|
||||
/** 道岔设置限速*/
|
||||
return OperationEvent.Switch.cancelSpeed.confirm2.domId;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
},
|
||||
domIdStop() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
|
||||
/** 区段设置限速*/
|
||||
return OperationEvent.Section.setSpeed.stop.domId;
|
||||
} else if (this.operation == OperationEvent.Section.cancelSpeed.menu.operation) {
|
||||
/** 区段取消限速*/
|
||||
return OperationEvent.Section.cancelSpeed.stop.domId;
|
||||
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation) {
|
||||
/** 道岔设置限速*/
|
||||
return OperationEvent.Switch.setSpeed.stop.domId;
|
||||
} else if (this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
|
||||
/** 道岔取消限速*/
|
||||
return OperationEvent.Switch.cancelSpeed.stop.domId;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
},
|
||||
domIdClose() {
|
||||
if (this.dialogShow) {
|
||||
return OperationEvent.Command.close.menu.domId;
|
||||
}
|
||||
return null;
|
||||
},
|
||||
isCancelSpeed() {
|
||||
return this.operation == OperationEvent.Section.cancelSpeed.menu.operation ||
|
||||
this.operation == OperationEvent.Switch.cancelSpeed.menu.operation;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
cmdDisabled: {
|
||||
handler(val, oldVal) {
|
||||
this.spdDisabled = false;
|
||||
val.forEach((elem, index) => {
|
||||
// 取消操作禁止选择限速,并跳过该步骤
|
||||
if (elem == false && index >= 1 || this.isCancelSpeed) {
|
||||
this.spdDisabled = true;
|
||||
}
|
||||
|
||||
// 在确定1之前的操作才可终止
|
||||
if (elem == false && index >= 1) {
|
||||
this.stpDisabled = false;
|
||||
}
|
||||
});
|
||||
},
|
||||
deep: true
|
||||
},
|
||||
'speed': function (val) {
|
||||
if (val) this.cmdDisabled[0] = false;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
this.timer = setInterval(() => {
|
||||
if (!this.$store.state.menuOperation.break) {
|
||||
if (this.timeCountCommand > 0) {
|
||||
this.timeCountCommand--;
|
||||
} else if (this.timeCountCommand == 0) {
|
||||
this.setButtonEnable({ step: 0 });
|
||||
this.timeCountCommand = -1;
|
||||
}
|
||||
if (this.timeCountConfirm > 0) {
|
||||
this.timeCountConfirm--;
|
||||
} else if (this.timeCountConfirm == 0) {
|
||||
this.setButtonEnable({ step: 0 });
|
||||
this.timeCountConfirm = -1;
|
||||
}
|
||||
}
|
||||
}, 1000);
|
||||
},
|
||||
beforeDestroy() {
|
||||
clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected, tempData) {
|
||||
if (!this.dialogShow) {
|
||||
this.name = '';
|
||||
this.stationName = '';
|
||||
if (selected) {
|
||||
if (operate.operation == OperationEvent.Section.setSpeed.menu.operation ||
|
||||
operate.operation == OperationEvent.Section.cancelSpeed.menu.operation) {
|
||||
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
|
||||
if (selected.type === '02') {
|
||||
const section = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
|
||||
if (section) {
|
||||
this.name += section.name;
|
||||
}
|
||||
}
|
||||
this.name += selected.name;
|
||||
}
|
||||
} else if (operate.operation == OperationEvent.Switch.setSpeed.menu.operation ||
|
||||
operate.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
|
||||
if (selected._type.toUpperCase() === 'Switch'.toUpperCase()) {
|
||||
this.name = selected.name;
|
||||
}
|
||||
}
|
||||
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
|
||||
this.speed = '';
|
||||
this.tableData = [];
|
||||
this.selected = selected;
|
||||
this.timeCountCommand = -1;
|
||||
this.timeCountConfirm = -1;
|
||||
this.cmdDisabled = [true, true, true];
|
||||
this.stpDisabled = true;
|
||||
this.order = 0;
|
||||
this.operation = operate.operation;
|
||||
this.setMessage(this.$t('tip.selectSpeedLimitValueTip'));
|
||||
if (this.isCancelSpeed) {
|
||||
this.speed = selected.speedUpLimit;
|
||||
this.spdDisabled = true;
|
||||
this.cmdDisabled = [false, true, true];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
speedSelectChange(val) {
|
||||
const operate = {
|
||||
val: val
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
|
||||
/** 区段设置限速*/
|
||||
operate.operation = OperationEvent.Section.setSpeed.choose.operation;
|
||||
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation) {
|
||||
/** 道岔设置限速*/
|
||||
operate.operation = OperationEvent.Switch.setSpeed.choose.operation;
|
||||
}
|
||||
|
||||
this.setMessage(this.$t('tip.releaseTip'));
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.setButtonEnable({ step: 0 });
|
||||
}
|
||||
});
|
||||
},
|
||||
command() {
|
||||
const operate = {};
|
||||
|
||||
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
|
||||
/** 区段设置限速*/
|
||||
operate.operation = OperationEvent.Section.setSpeed.order.operation;
|
||||
operate.message = this.$t('menu.in') + `【${this.name}】` + this.$t('menu.sectionSetLimitPrefix') + `${this.speed}` + this.$t('menu.sectionLimitSuffix');
|
||||
} else if (this.operation == OperationEvent.Section.cancelSpeed.menu.operation) {
|
||||
/** 区段取消限速*/
|
||||
operate.operation = OperationEvent.Section.cancelSpeed.order.operation;
|
||||
operate.message = `在【${this.name}】区段,区段取消限速,确认下达吗?`;
|
||||
// operate.message = this.$t('menu.in') + `【${this.name}】` + this.$t('menu.sectionCancelLimitPrefix') + `${this.speed}` + this.$t('menu.sectionLimitSuffix');
|
||||
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation) {
|
||||
/** 道岔设置限速*/
|
||||
operate.operation = OperationEvent.Switch.setSpeed.order.operation;
|
||||
operate.message = this.$t('menu.in') + `【${this.name}】` + this.$t('menu.switchSetLimitPrefix') + `${this.speed}` + this.$t('menu.sectionLimitSuffix');
|
||||
} else if (this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
|
||||
/** 道岔取消限速*/
|
||||
operate.operation = OperationEvent.Switch.cancelSpeed.order.operation;
|
||||
operate.message = `在【${this.name}】道岔,道岔取消限速,确认下达吗?`;
|
||||
// operate.message = this.$t('menu.in') + `【${this.name}】` + this.$t('menu.switchCancelLimitPrefix') + `${this.speed}` + this.$t('menu.sectionLimitSuffix');
|
||||
}
|
||||
|
||||
this.setMessage(this.$t('tip.firstConfirmTip'));
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: '' });
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.executionSucceed') });
|
||||
this.$refs.confirmControlSpeed.doShow(operate, this.selected);
|
||||
} else {
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.executionFailed') });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.executionException') });
|
||||
});
|
||||
},
|
||||
confirm1() {
|
||||
const operate = {};
|
||||
|
||||
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
|
||||
/** 区段设置限速*/
|
||||
operate.operation = OperationEvent.Section.setSpeed.confirm1.operation;
|
||||
} else if (this.operation == OperationEvent.Section.cancelSpeed.menu.operation) {
|
||||
/** 区段取消限速*/
|
||||
operate.operation = OperationEvent.Section.cancelSpeed.confirm1.operation;
|
||||
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation) {
|
||||
/** 道岔设置限速*/
|
||||
operate.operation = OperationEvent.Switch.setSpeed.confirm1.operation;
|
||||
} else if (this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
|
||||
/** 道岔取消限速*/
|
||||
operate.operation = OperationEvent.Switch.cancelSpeed.confirm1.operation;
|
||||
}
|
||||
|
||||
this.setMessage(this.$t('tip.secondConfirmTip'));
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: '' });
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.timeCountCommand = -1;
|
||||
this.timeCountConfirm = 10;
|
||||
this.setButtonEnable({ step: 2 });
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: this.$t('tip.executionSucceed') });
|
||||
} else {
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: this.$t('tip.executionFailed') });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: this.$t('tip.executionException') });
|
||||
});
|
||||
},
|
||||
confirm2() {
|
||||
const operate = {
|
||||
over: true,
|
||||
param: {
|
||||
speedLimitValue: this.speed
|
||||
}
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
|
||||
/** 区段设置限速*/
|
||||
operate.operation = OperationEvent.Section.setSpeed.confirm2.operation;
|
||||
operate.cmdType = CMD.Section.CMD_SECTION_SET_LIMIT_SPEED;
|
||||
} else if (this.operation == OperationEvent.Section.cancelSpeed.menu.operation) {
|
||||
/** 区段取消限速*/
|
||||
operate.operation = OperationEvent.Section.cancelSpeed.confirm2.operation;
|
||||
operate.cmdType = CMD.Section.CMD_SECTION_SET_LIMIT_SPEED;
|
||||
operate.param.speedLimitValue = '0';
|
||||
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation) {
|
||||
/** 道岔设置限速*/
|
||||
operate.operation = OperationEvent.Switch.setSpeed.confirm2.operation;
|
||||
operate.cmdType = CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED;
|
||||
} else if (this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
|
||||
/** 道岔取消限速*/
|
||||
operate.operation = OperationEvent.Switch.cancelSpeed.confirm2.operation;
|
||||
operate.cmdType = CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED;
|
||||
operate.param.speedLimitValue = '0';
|
||||
}
|
||||
|
||||
this.setMessage('');
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: '' });
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.timeCountCommand = -1;
|
||||
this.timeCountConfirm = -1;
|
||||
this.setButtonEnable({ step: -1 });
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: this.$t('tip.executionSucceed') });
|
||||
} else {
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: this.$t('tip.executionFailed') });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.timeCountCommand = -1;
|
||||
this.timeCountConfirm = -1;
|
||||
this.setButtonEnable({ step: -1 });
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: this.$t('tip.executionException') });
|
||||
});
|
||||
},
|
||||
stop() {
|
||||
const operate = {};
|
||||
|
||||
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
|
||||
/** 区段设置限速*/
|
||||
operate.operation = OperationEvent.Section.setSpeed.stop.operation;
|
||||
} else if (this.operation == OperationEvent.Section.cancelSpeed.menu.operation) {
|
||||
/** 区段取消限速*/
|
||||
operate.operation = OperationEvent.Section.cancelSpeed.stop.operation;
|
||||
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation) {
|
||||
/** 道岔设置限速*/
|
||||
operate.operation = OperationEvent.Switch.setSpeed.stop.operation;
|
||||
} else if (this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
|
||||
/** 道岔取消限速*/
|
||||
operate.operation = OperationEvent.Switch.cancelSpeed.stop.operation;
|
||||
}
|
||||
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSuspend'), result: '' });
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.setButtonEnable({ step: 0 });
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSuspend'), result: this.$t('tip.executionSucceed') });
|
||||
} else {
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSuspend'), result: this.$t('tip.executionFailed') });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSuspend'), result: this.$t('tip.executionException') });
|
||||
});
|
||||
},
|
||||
close() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.close.menu.operation
|
||||
};
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickToClose'), result: '' });
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
},
|
||||
getOperate(operate) {
|
||||
if (operate.step) {
|
||||
this.setButtonEnable({ step: operate.step });
|
||||
}
|
||||
},
|
||||
setButtonEnable(param) {
|
||||
this.cmdDisabled = [true, true, true];
|
||||
if (param && param.step >= 0) {
|
||||
this.cmdDisabled[param.step] = false;
|
||||
}
|
||||
},
|
||||
setMessage(message) {
|
||||
this.message = message;
|
||||
},
|
||||
writeRecord(param) {
|
||||
this.tableData.push(param);
|
||||
},
|
||||
editRecord(param) {
|
||||
this.tableData.forEach(elem => {
|
||||
if (elem.order == param.order) {
|
||||
for (var prop in param) {
|
||||
elem[prop] = param[prop];
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
253
src/jmapNew/theme/nanjing_02/menus/dialog/standBackStrategy.vue
Normal file
253
src/jmapNew/theme/nanjing_02/menus/dialog/standBackStrategy.vue
Normal file
@ -0,0 +1,253 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="haerbin-01__systerm stand-run-level"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="500px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row class="header">
|
||||
<el-col :span="10"><span>{{ $t('menu.stationName') }}</span></el-col>
|
||||
<el-col :span="10" :offset="2"><span>{{ $t('menu.stationStandStatus') }}</span></el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-input v-model="stationName" size="small" disabled />
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="2">
|
||||
<div style="height: 32px;">
|
||||
<el-radio
|
||||
v-model="standStatus"
|
||||
label="02"
|
||||
style="line-height: 32px;"
|
||||
:style="{color: standStatus == '02' ? '' : 'red'}"
|
||||
disabled
|
||||
>{{ $t('menu.upDirection') }}</el-radio>
|
||||
<el-radio
|
||||
v-model="standStatus"
|
||||
label="01"
|
||||
style="line-height: 32px;"
|
||||
:style="{color: standStatus == '01' ? '' : 'red'}"
|
||||
disabled
|
||||
>{{ $t('menu.downDirection') }}</el-radio>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="table">
|
||||
<span>{{ $t('menu.stationStandStatus') }}</span>
|
||||
<el-table ref="tempData" :data="tempData" border style="width: 100%; height: 170px;" size="mini">
|
||||
<el-table-column prop="name" :width="170" :label="this.$t('menu.switchbackStation')" />
|
||||
<el-table-column prop="station" :label="this.$t('menu.switchbackPlatform')" />
|
||||
<el-table-column prop="strategy" :label="this.$t('menu.switchbackStrategy')">
|
||||
<template slot-scope="scope">
|
||||
<el-select
|
||||
:id="domIdChoose"
|
||||
v-model="scope.row.strategy"
|
||||
size="mini"
|
||||
@change="strategySelectChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in strategyList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<el-row class="button-group">
|
||||
<span v-if="isSelect && tempData.length">{{ $t('menu.switchbackStrategyTip') }}</span>
|
||||
<span v-if="isConfirm && tempData.length">{{ $t('menu.setSwitchbackStrategyTipPrefix') + tempData[0].name + $t('menu.setSwitchbackStrategyTipSuffix') }}</span>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!isConfirm" @click="commit">
|
||||
{{ $t('global.confirm') }}</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<confirm-control ref="confirmControl" />
|
||||
<notice-info ref="noticeInfo" pop-class="haerbin-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ConfirmControl from './childDialog/confirmControl';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { mapGetters } from 'vuex';
|
||||
|
||||
export default {
|
||||
name: 'StandBackStrategy',
|
||||
components: {
|
||||
ConfirmControl,
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
tempData: [],
|
||||
strategyList: [
|
||||
{
|
||||
value: '01',
|
||||
label: this.$t('menu.noSwitchback')
|
||||
},
|
||||
{
|
||||
value: '02',
|
||||
label: this.$t('menu.noOneSwitchback')
|
||||
},
|
||||
{
|
||||
value: '03',
|
||||
label: this.$t('menu.automaticChange')
|
||||
},
|
||||
{
|
||||
value: '04',
|
||||
label: this.$t('menu.default')
|
||||
}
|
||||
],
|
||||
stationName: '',
|
||||
standStatus: '',
|
||||
selection: [],
|
||||
isSelect: true,
|
||||
isConfirm: false,
|
||||
strategy: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.StationStand.setBackStrategy.menu.domId : '';
|
||||
},
|
||||
domIdChoose() {
|
||||
return this.dialogShow ? OperationEvent.StationStand.setBackStrategy.choose.domId : '';
|
||||
},
|
||||
title() {
|
||||
return this.$t('menu.setSwitchbackStrategy');
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
loadInitData(selected, opts) {
|
||||
this.tempData = [];
|
||||
const station = this.stationList.find(n => n.code == selected.stationCode);
|
||||
this.tempData.push({ name: station.name, station: selected.name, strategy: opts.reentryStrategy });
|
||||
},
|
||||
doShow(operate, selected, opts) {
|
||||
if (!this.dialogShow) {
|
||||
this.standStatus = '';
|
||||
this.stationName = '';
|
||||
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
|
||||
this.standStatus = selected.direction;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
}
|
||||
this.loadInitData(selected, opts);
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
checkTableDataSelction(data) {
|
||||
const selection = [];
|
||||
if (data && data.length > 0) {
|
||||
data.forEach(row => {
|
||||
if (row.check && !row.disabled) {
|
||||
selection.push(row);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
this.disabledSend = !selection.length;
|
||||
if (JSON.stringify(selection) !== JSON.stringify(this.selection)) {
|
||||
this.selection = selection;
|
||||
}
|
||||
},
|
||||
strategySelectChange(strategy) {
|
||||
const operate = {
|
||||
operation: OperationEvent.StationStand.setBackStrategy.choose.operation,
|
||||
val: `${strategy}`
|
||||
};
|
||||
|
||||
this.strategy = strategy;
|
||||
this.isSelect = false;
|
||||
this.isConfirm = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
if (this.isConfirm) {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.StationStand.setBackStrategy.menu.operation,
|
||||
val: `${this.strategy}`,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_REENTRY_STRATEGY,
|
||||
param:{
|
||||
Stand_ReentryStrategy:this.strategy
|
||||
}
|
||||
};
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
271
src/jmapNew/theme/nanjing_02/menus/dialog/standControl.vue
Normal file
271
src/jmapNew/theme/nanjing_02/menus/dialog/standControl.vue
Normal file
@ -0,0 +1,271 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="haerbin-01__systerm stand-detain-train"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="320px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div class="context">
|
||||
<span>{{ preContext }}{{ standName }}</span>
|
||||
</div>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('global.confirm') }}</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="haerbin-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'StandDetainTrain',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
standName: '',
|
||||
selected: null,
|
||||
operation: null
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
||||
},
|
||||
title() {
|
||||
if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) {
|
||||
return this.$t('menu.menuStationStand.detainTrain');
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation) {
|
||||
return this.$t('menu.menuStationStand.cancelDetainTrain');
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrainForce.menu.operation) {
|
||||
return this.$t('menu.menuStationStand.cancelDetainTrainForce');
|
||||
} else if (this.operation == OperationEvent.StationStand.earlyDeparture.menu.operation) {
|
||||
return this.$t('menu.menuStationStand.earlyDeparture');
|
||||
} else if (this.operation == OperationEvent.StationStand.setJumpStop.menu.operation) {
|
||||
return this.$t('menu.menuStationStand.setJumpStop');
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelJumpStop.menu.operation) {
|
||||
return this.$t('menu.menuStationStand.cancelJumpStop');
|
||||
}
|
||||
return '';
|
||||
},
|
||||
preContext() {
|
||||
return this.title + ':';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(step, selected) {
|
||||
if (!this.dialogShow) {
|
||||
this.standName = '';
|
||||
if (selected) {
|
||||
this.standName = selected.name;
|
||||
}
|
||||
|
||||
this.selected = selected;
|
||||
this.operation = step.operation;
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) {
|
||||
/** 设置扣车*/
|
||||
this.setDetainTrain();
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation) {
|
||||
/** 取消扣车*/
|
||||
this.cancelDetainTrain();
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrainForce.menu.operation) {
|
||||
/** 强制取消扣车*/
|
||||
this.cancelDetainTrainForce();
|
||||
} else if (this.operation == OperationEvent.StationStand.earlyDeparture.menu.operation) {
|
||||
/** 提前发车*/
|
||||
this.earlyDeparture();
|
||||
} else if (this.operation == OperationEvent.StationStand.setJumpStop.menu.operation) {
|
||||
/** 设置跳停*/
|
||||
this.setJumpStop();
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelJumpStop.menu.operation) {
|
||||
/** 取消跳停*/
|
||||
this.cancelJumpStop();
|
||||
}
|
||||
},
|
||||
// 设置扣车
|
||||
setDetainTrain() {
|
||||
const step = {
|
||||
over: true,
|
||||
operation: OperationEvent.StationStand.setDetainTrain.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_HOLD_TRAIN
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
if (!valid) {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 取消扣车
|
||||
cancelDetainTrain() {
|
||||
const step = {
|
||||
over: true,
|
||||
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
if (!valid) {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 强制取消扣车
|
||||
cancelDetainTrainForce() {
|
||||
const step = {
|
||||
over: true,
|
||||
operation: OperationEvent.StationStand.cancelDetainTrainForce.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_FORCE_CANCEL_HOLD_TRAIN
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
if (!valid) {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 提前发车
|
||||
earlyDeparture() {
|
||||
const step = {
|
||||
over: true,
|
||||
operation: OperationEvent.StationStand.earlyDeparture.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_EARLY_DEPART
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 设置跳停
|
||||
setJumpStop() {
|
||||
const step = {
|
||||
over: true,
|
||||
operation: OperationEvent.StationStand.setJumpStop.menu.operation,
|
||||
val: this.selected.direction, // 站台的上下行方向, 01:下行 /02:上行
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_JUMP_STOP
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 取消跳停
|
||||
cancelJumpStop() {
|
||||
const step = {
|
||||
over: true,
|
||||
operation: OperationEvent.StationStand.cancelJumpStop.menu.operation,
|
||||
val: this.selected.direction, // 站台的上下行方向, 01:下行 /02:上行
|
||||
cmdType: CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const step = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.loading = false;
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.stand-detain-train .context {
|
||||
height: 80px !important;
|
||||
}
|
||||
</style>
|
180
src/jmapNew/theme/nanjing_02/menus/dialog/standDetail.vue
Normal file
180
src/jmapNew/theme/nanjing_02/menus/dialog/standDetail.vue
Normal file
@ -0,0 +1,180 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="haerbin-01__systerm stand-detail"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="400px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row class="header">
|
||||
<el-col :span="10"><span>{{ $t('menu.stationName') }}</span></el-col>
|
||||
<el-col :span="10" :offset="2"><span>{{ $t('menu.platform') }}</span></el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-input v-model="stationName" size="small" disabled />
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-input v-model="standName" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="table">
|
||||
<span>{{ $t('menu.stationStandStatus') }}</span>
|
||||
<el-table ref="tempData" :data="tempData" border style="width: 100%" size="mini" highlight-current-row>
|
||||
<el-table-column prop="item" :width="140" :label="this.$t('menu.item')" />
|
||||
<el-table-column prop="status" :label="this.$t('global.status')" />
|
||||
</el-table>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('global.confirm') }}</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="haerbin-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { mapGetters } from 'vuex';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'StandDetail',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
tempData: [],
|
||||
stationName: '',
|
||||
standName: '',
|
||||
strategyMap: {
|
||||
'01': this.$t('menu.noSwitchback'),
|
||||
'02': this.$t('menu.noOneSwitchback'),
|
||||
'03': this.$t('menu.automaticChange'),
|
||||
'04': this.$t('menu.default')
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
||||
},
|
||||
title() {
|
||||
return this.$t('menu.menuStationStand.getStationStandStatus');
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
loadInitData(selected, opts) {
|
||||
this.tempData = [];
|
||||
|
||||
const index = this.stationList.findIndex(n => n.code == selected.stationCode);
|
||||
let stationStand, station;
|
||||
if (selected.direction == '01') { // 下行
|
||||
// 下行时,此站不是最后一站
|
||||
if (index != 0) {
|
||||
stationStand = this.$store.getters['map/getDeviceByCode'](this.stationList[index - 1].code);
|
||||
station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
|
||||
}
|
||||
} else {
|
||||
// 上行时,此站不是最后一站
|
||||
if (index != this.stationList.length - 1) {
|
||||
stationStand = this.$store.getters['map/getDeviceByCode'](this.stationList[index + 1].code);
|
||||
station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
|
||||
}
|
||||
}
|
||||
|
||||
/** 01: 未设置扣车 02: 车站扣车 03: 中心扣车 04: 中心+车站扣车*/
|
||||
this.tempData.push({ item: this.$t('menu.stationDetainTrain'), status: opts.holdStatus == '02' || opts.holdStatus == '04' ? this.$t('menu.hasBeenSet') : this.$t('menu.notSet') });
|
||||
this.tempData.push({ item: this.$t('menu.centerDetainTrain'), status: opts.holdStatus == '03' || opts.holdStatus == '04' ? this.$t('menu.hasBeenSet') : this.$t('menu.notSet') });
|
||||
this.tempData.push({ item: this.$t('menu.stopTime'), status: opts.parkingTime != -1 ? opts.parkingTime : this.$t('menu.automatic2') });
|
||||
if (!stationStand || !station) {
|
||||
this.tempData.push({ item: this.$t('menu.runLevel'), status: this.$t('menu.automatic2') });
|
||||
} else {
|
||||
this.tempData.push({ item: this.$t('menu.runLevel'), status: opts.intervalRunTime > 0 ? this.$t('menu.to') + station.name + stationStand.name + this.$t('global.colon') + this.$t('menu.artificial') : this.$t('menu.to') + station.name + stationStand.name + this.$t('menu.automatic2') });
|
||||
}
|
||||
this.tempData.push({ item: this.$t('menu.jumpStop'), status: opts.jumpStopStatus != '01' ? this.$t('menu.hasBeenSet') : this.$t('menu.notSet') });
|
||||
this.tempData.push({ item: this.$t('menu.downSwitchbackStrategy'), status: this.strategyMap[opts.reentryStrategy] ? this.strategyMap[opts.reentryStrategy] : this.$t('menu.default') });
|
||||
},
|
||||
doShow(operate, selected, opts) {
|
||||
if (!this.dialogShow) {
|
||||
this.standName = '';
|
||||
this.stationName = '';
|
||||
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
|
||||
this.standName = selected.name;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
}
|
||||
this.loadInitData(selected, opts);
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Command.close.confirm.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_VIEW_STATUS
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -0,0 +1,192 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="haerbin-01__systerm stand-detain-train-all"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="390px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-radio-group style="padding: 10px 20px; border: 1px double lightgray;width:100%;">
|
||||
<span class="base-label" style="font-size:14px;">{{ $t('menu.range') }}</span>
|
||||
<el-row>
|
||||
<el-radio-group v-model="upDown" style="width:100%;" @change="choose">
|
||||
<el-col :span="11">
|
||||
<el-radio :id="upDown == '01' ? domIdChoose : ''" label="02">{{ $t('menu.uplinkBroadly') }}</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-radio :id="upDown == '02' ? domIdChoose : ''" label="01">{{ $t('menu.downlinkBroadly') }}</el-radio>
|
||||
</el-col>
|
||||
</el-radio-group>
|
||||
</el-row>
|
||||
</el-radio-group>
|
||||
|
||||
<div class="table">
|
||||
<span>{{ $t('menu.detainTrainStationList') }}</span>
|
||||
<el-table
|
||||
ref="tempData"
|
||||
:data="tempData"
|
||||
border
|
||||
style="width: 100%"
|
||||
size="mini"
|
||||
:empty-text="this.$t('menu.allStationsHaveNoDetainTrainStatus')"
|
||||
height="160"
|
||||
highlight-current-row
|
||||
>
|
||||
<el-table-column prop="stationName" :label="this.$t('menu.stationName')" />
|
||||
<el-table-column prop="standName" :width="140" :label="this.$t('menu.detainTrainStation')" />
|
||||
</el-table>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="disabled" @click="commit">{{ $t('global.confirm') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="haerbin-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'StandDetainTrainAll',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
upDown: '01',
|
||||
tempData: [],
|
||||
disabled: true,
|
||||
operation: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdChoose() {
|
||||
return this.dialogShow ? OperationEvent.StationStand.cancelDetainTrainAll.choose.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.StationStand.cancelDetainTrainAll.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
if (this.operation == OperationEvent.StationStand.cancelDetainTrainAll.menu.operation) {
|
||||
return this.$t('menu.menuStationStand.cancelDetainTrainAll');
|
||||
} else {
|
||||
return this.$t('menu.menuStationStand.cancelJumpStopAll');
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
loadTableData() {
|
||||
this.tempData = [];
|
||||
this.stationStandList.forEach(elem => {
|
||||
/** status 01: 未扣车*/
|
||||
const stand = (this.$store.getters['map/getDeviceByCode'](elem.code) || {}).status;
|
||||
const station = (this.$store.getters['map/getDeviceByCode'](elem.stationCode) || {});
|
||||
if (station && station.visible && stand && stand.holdStatus != '01' && Number(elem.direction) == Number(this.upDown)) {
|
||||
this.tempData.push({ stationName: station.name, standName: elem.name });
|
||||
}
|
||||
});
|
||||
|
||||
// 如果存在未扣车的情况,才可以做此操作
|
||||
if (this.tempData.length > 0) {
|
||||
this.disabled = false;
|
||||
}
|
||||
},
|
||||
doShow(operate, selected) {
|
||||
// 不是断点激活的菜单应该将状态初始化
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
this.upDown = selected.direction;
|
||||
this.loadTableData();
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
choose(upDown) {
|
||||
this.loadTableData();
|
||||
const operate = {
|
||||
operation: OperationEvent.StationStand.cancelDetainTrainAll.choose.operation,
|
||||
val: `${upDown}`
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.StationStand.cancelDetainTrainAll.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_WHOLE_LINE_CANCEL_HOLD_TRAIN,
|
||||
val: this.upDown,
|
||||
param: {
|
||||
Stand_AllLine: this.upDown
|
||||
}
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
276
src/jmapNew/theme/nanjing_02/menus/dialog/standRunLevel.vue
Normal file
276
src/jmapNew/theme/nanjing_02/menus/dialog/standRunLevel.vue
Normal file
@ -0,0 +1,276 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="haerbin-01__systerm stand-run-level"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="500px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row class="header">
|
||||
<el-col :span="10"><span>{{ $t('menu.stationName') }}</span></el-col>
|
||||
<el-col :span="10" :offset="2"><span>{{ $t('menu.platform') }}</span></el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-input v-model="stationName" size="small" disabled />
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-input v-model="standName" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="table">
|
||||
<span>{{ $t('menu.stationStandStatus') }}</span>
|
||||
<el-table ref="tempData" :data="tempData" border style="width: 100%; height: 170px;" size="mini">
|
||||
<el-table-column prop="name" :width="210" :label="this.$t('menu.nextPlatform')" />
|
||||
<el-table-column prop="time" :label="this.$t('menu.intervalRunningTime')">
|
||||
<template slot-scope="scope">
|
||||
<el-select :id="domIdChoose" v-model="scope.row.time" size="mini" @change="timeSelectChange">
|
||||
<el-option
|
||||
v-for="item in timeList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="check" :label="this.$t('menu.alwaysEffective')">
|
||||
<template slot-scope="scope">
|
||||
<el-checkbox :id="domIdCheck" ref="check" v-model="scope.row.check" @change="checkChange" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<el-row class="button-group">
|
||||
<span v-if="isSelect && tempData.length">{{ $t('menu.setRunLevelTip') }}</span>
|
||||
<span v-if="isConfirm && tempData.length">{{ $t('menu.setRunLevelStationTip') + tempData[0].name }}</span>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!isConfirm" @click="commit">
|
||||
{{ $t('global.confirm') }}</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<confirm-control ref="confirmControl" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { mapGetters } from 'vuex';
|
||||
import ConfirmControl from './childDialog/confirmControl';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'StandRunLevel',
|
||||
components: {
|
||||
ConfirmControl
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
tempData: [],
|
||||
maxRunLevel: 300,
|
||||
stationName: '',
|
||||
standName: '',
|
||||
selection: [],
|
||||
isSelect: true,
|
||||
isConfirm: false,
|
||||
time: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationList',
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.StationStand.setRunLevel.menu.domId : '';
|
||||
},
|
||||
domIdChoose() {
|
||||
return this.dialogShow ? OperationEvent.StationStand.setRunLevel.choose.domId : '';
|
||||
},
|
||||
domIdCheck() {
|
||||
return this.dialogShow ? OperationEvent.StationStand.setRunLevel.check.domId : '';
|
||||
},
|
||||
title() {
|
||||
return this.$t('menu.menuStationStand.setRunLevel');
|
||||
},
|
||||
timeList() {
|
||||
const list = [
|
||||
{ value: 0, label: this.$t('menu.automatic2') },
|
||||
{ value: 1, label: '1' }
|
||||
];
|
||||
for (var i = 60; i <= this.maxRunLevel; i++) {
|
||||
list.push({ value: i, label: `${i}` });
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
// 深度数据状态
|
||||
tempData: {
|
||||
handler(val, oldVal) {
|
||||
this.checkTableDataSelction(val);
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
loadInitData(selected, opts) {
|
||||
this.tempData = [];
|
||||
const index = this.stationList.findIndex(n => n.code == selected.stationCode);
|
||||
if (selected.direction == '01') { // 下行
|
||||
// 下行时,此站不是最后一站
|
||||
if (index != 0) {
|
||||
const stationStand = this.$store.getters['map/getDeviceByCode'](this.stationStandList[index + 1].code);
|
||||
const station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
|
||||
this.tempData.push({ name: `${stationStand.name}(${station.name})`, time: opts.intervalRunTime ? opts.intervalRunTime : 0, check: opts.intervalRunTimeValidStatus });
|
||||
}
|
||||
} else {
|
||||
// 上行时,此站不是最后一站
|
||||
if (index != this.stationList.length) {
|
||||
const stationStand = this.$store.getters['map/getDeviceByCode'](this.stationStandList[index + 1].code);
|
||||
const station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
|
||||
this.tempData.push({ name: `${stationStand.name}(${station.name})`, time: opts.intervalRunTime ? opts.intervalRunTime : 0, check: opts.intervalRunTimeValidStatus });
|
||||
}
|
||||
}
|
||||
},
|
||||
doShow(operate, selected, opts) {
|
||||
// 如果不是断点激活窗口,而是第一次显示窗口时,需要初始化窗口数据
|
||||
if (!this.dialogShow) {
|
||||
this.standName = '';
|
||||
this.stationName = '';
|
||||
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
|
||||
this.standName = selected.name;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
}
|
||||
this.loadInitData(selected, opts);
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
checkTableDataSelction(data) {
|
||||
const selection = [];
|
||||
if (data && data.length > 0) {
|
||||
data.forEach(row => {
|
||||
if (row.check && !row.disabled) {
|
||||
selection.push(row);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
this.disabledSend = !selection.length;
|
||||
if (JSON.stringify(selection) !== JSON.stringify(this.selection)) {
|
||||
this.selection = selection;
|
||||
}
|
||||
},
|
||||
timeSelectChange(time) {
|
||||
const operate = {
|
||||
operation: OperationEvent.StationStand.setRunLevel.choose.operation,
|
||||
val: time.toString(),
|
||||
param: {
|
||||
Stand_RunLevel: time
|
||||
}
|
||||
};
|
||||
|
||||
this.time = time;
|
||||
this.isSelect = false;
|
||||
this.isConfirm = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
});
|
||||
},
|
||||
checkChange(check) {
|
||||
const operate = {
|
||||
operation: OperationEvent.StationStand.setRunLevel.check.operation,
|
||||
val: check.toString(),
|
||||
param: {
|
||||
Stand_AlwaysValid: !!this.tempData[0].check
|
||||
}
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
if (this.isConfirm) {
|
||||
const forver = !!this.tempData[0].check;
|
||||
const operate = {
|
||||
operation: OperationEvent.StationStand.setRunLevel.menu.operation,
|
||||
val: [this.time, forver].join('::'),
|
||||
param:{
|
||||
Stand_AlwaysValid:forver,
|
||||
Stand_RunLevel:this.time
|
||||
},
|
||||
messages: [`${this.$t('menu.menuStationStand.setRunLevel')}${this.$t('global.colon')}${this.tempData[0].name}-${this.standName},${this.tempData[0].time == 0 ? this.$t('menu.runTimeAutomatically') : `${this.$t('menu.runningTimeIs')}${this.tempData[0].time}s`},${this.$t('menu.effectiveFrequencyIs')}${this.tempData[0].check ? this.$t('menu.alwaysEffective') : this.$t('menu.onceEffective')}`]
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.confirmControl.doShow(operate);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
});
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
265
src/jmapNew/theme/nanjing_02/menus/dialog/standStopTime.vue
Normal file
265
src/jmapNew/theme/nanjing_02/menus/dialog/standStopTime.vue
Normal file
@ -0,0 +1,265 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="haerbin-01__systerm stand-stop-time"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="430px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row class="header">
|
||||
<el-col :span="11"><span>{{ $t('menu.stationName') }}</span></el-col>
|
||||
<el-col :span="11" :offset="2"><span>{{ $t('menu.platformName') }}</span></el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-input v-model="stationName" size="small" disabled />
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="2">
|
||||
<el-input v-model="standName" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div style="padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 60px;">
|
||||
<span class="base-label">{{ $t('menu.controlMode') }}</span>
|
||||
<div style=" position: relative; top:-10px;">
|
||||
<el-radio-group v-model="control" @change="chooseControl">
|
||||
<el-radio :id="control === '01'? '': domIdChoose1" label="01">{{ $t('menu.automatic2') }}</el-radio>
|
||||
<el-radio :id="control === '02'? '': domIdChoose1" label="02">{{ $t('menu.artificial') }}</el-radio>
|
||||
</el-radio-group>
|
||||
<el-input-number
|
||||
:id="domIdInput"
|
||||
v-model="time"
|
||||
:disabled="disabledInput"
|
||||
controls-position="right"
|
||||
:min="0"
|
||||
size="mini"
|
||||
style="width: 125px; padding-left:25px"
|
||||
@change="inputTime"
|
||||
/><span> {{ $t('global.second') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding: 0px 15px; height: 30px;">
|
||||
<div style=" position: relative; top:-5px;">
|
||||
<el-radio-group v-model="direction">
|
||||
<el-radio label="02" :disabled="disabledUp">{{ $t('menu.upDirection') }}</el-radio>
|
||||
<el-radio label="01" :disabled="disabledDown">{{ $t('menu.downDirection') }}</el-radio>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding: 10px 15px; border: 1px double lightgray; height: 60px;">
|
||||
<span class="base-label">{{ $t('menu.effectiveNumber') }}</span>
|
||||
<div style=" position: relative; top:-10px;">
|
||||
<el-radio-group v-model="effective" :disabled="disabledTime" @change="chooseEffective">
|
||||
<el-radio :id="effective === false? '': domIdChoose2" :label="false">{{ $t('menu.onceEffective') }}</el-radio>
|
||||
<el-radio :id="effective === true? '': domIdChoose2" :label="true">{{ $t('menu.alwaysEffective') }}</el-radio>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('global.confirm') }}</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<confirm-control ref="confirmControl" />
|
||||
<notice-info ref="noticeInfo" pop-class="haerbin-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import ConfirmControl from './childDialog/confirmControl';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
// import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'StandStopTime',
|
||||
components: {
|
||||
ConfirmControl,
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
time: 0,
|
||||
control: '01',
|
||||
direction: '01',
|
||||
effective: false,
|
||||
selected: null,
|
||||
standName: '',
|
||||
stationName: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.StationStand.setStopTime.menu.domId : '';
|
||||
},
|
||||
domIdChoose1() {
|
||||
return this.dialogShow ? OperationEvent.StationStand.setStopTime.choose1.domId : '';
|
||||
},
|
||||
domIdChoose2() {
|
||||
return this.dialogShow ? OperationEvent.StationStand.setStopTime.choose2.domId : '';
|
||||
},
|
||||
domIdInput() {
|
||||
return this.dialogShow ? OperationEvent.StationStand.setStopTime.input.domId : '';
|
||||
},
|
||||
disabledUp() {
|
||||
if (this.selected) {
|
||||
return this.selected.direction !== '02';
|
||||
}
|
||||
return true;
|
||||
},
|
||||
disabledDown() {
|
||||
if (this.selected) {
|
||||
return this.selected.direction !== '01';
|
||||
}
|
||||
return true;
|
||||
},
|
||||
disabledInput() {
|
||||
return this.control === '01'; // 如果是自动则不可以设置
|
||||
},
|
||||
disabledTime() {
|
||||
return this.control === '01'; // 如果是自动则不可以设置
|
||||
},
|
||||
title() {
|
||||
return this.$t('menu.stopTime');
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected, tempDate) {
|
||||
// 如果不是断点激活,则需要对初始值进行初始化
|
||||
if (!this.dialogShow) {
|
||||
this.standName = '';
|
||||
this.stationName = '';
|
||||
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
|
||||
this.standName = selected.name;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
}
|
||||
|
||||
this.control = Number(tempDate.parkingTime) === -1 ? '01' : '02';
|
||||
this.time = Number(tempDate.parkingTime) === -1 ? 15 : Number(tempDate.parkingTime);
|
||||
this.effective = !!tempDate.parkingValidStatus;
|
||||
this.direction = selected.direction;
|
||||
this.selected = selected || {};
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
chooseControl(control) {
|
||||
/** 自动时的默认时间*/
|
||||
if (control == '01') {
|
||||
this.inputTime = 15;
|
||||
this.effective = true;
|
||||
}
|
||||
|
||||
const operate = {
|
||||
operation: OperationEvent.StationStand.setStopTime.choose1.operation,
|
||||
val: `${control}`,
|
||||
param: {
|
||||
Stand_StopControl: `${control}`
|
||||
}
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
});
|
||||
},
|
||||
chooseEffective(effective) {
|
||||
const operate = {
|
||||
operation: OperationEvent.StationStand.setStopTime.choose2.operation,
|
||||
val: `${effective}`,
|
||||
param: {
|
||||
Stand_AlwaysValid: `${effective}`
|
||||
}
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
});
|
||||
},
|
||||
inputTime(time) {
|
||||
const operate = {
|
||||
repeat: true,
|
||||
operation: OperationEvent.StationStand.setStopTime.input.operation,
|
||||
val: `${time}`,
|
||||
param: {
|
||||
Stand_StopTime: `${time}`
|
||||
}
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
operation: OperationEvent.StationStand.setStopTime.menu.operation,
|
||||
val: [`${this.control}`, this.time, this.effective].join('::'),
|
||||
param:{
|
||||
Stand_StopControl:this.control,
|
||||
Stand_AlwaysValid:this.effective,
|
||||
Stand_StopTime:this.time
|
||||
},
|
||||
messages: [`${this.$t('menu.stopTime') + this.$t('global.colon') + this.stationName} - ${this.standName}, ${this.$t('menu.stopTimeIs')}${this.control == '01' ? this.$t('menu.automatic2') : this.time + this.$t('global.second')}, ${this.$t('menu.effectiveFrequencyIs')}${this.effective == false ? this.$t('menu.alwaysEffective') : this.$t('menu.onceEffective')}`]
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.confirmControl.doShow(operate);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.close.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
406
src/jmapNew/theme/nanjing_02/menus/dialog/stationCmdControl.vue
Normal file
406
src/jmapNew/theme/nanjing_02/menus/dialog/stationCmdControl.vue
Normal file
@ -0,0 +1,406 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="haerbin-01__systerm station-cmd-control"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="840px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div style="padding: 10px 20px; border: 1px solid lightgray;">
|
||||
<span class="base-label">{{ $t('menu.commandInformation') }}</span>
|
||||
<el-form label-position="center" size="mini">
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item :label="this.$t('menu.type')" label-width="40px">
|
||||
<el-select v-model="operation" size="small" disabled style="width:230px">
|
||||
<el-option
|
||||
v-for="option in typeList"
|
||||
:key="option.code"
|
||||
:label="option.name"
|
||||
:value="option.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11">
|
||||
<el-form-item :label="this.$t('menu.stationName')" label-width="100px">
|
||||
<el-input v-model="stationName" size="small" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-table
|
||||
ref="tempData"
|
||||
class="table"
|
||||
:data="tempData"
|
||||
border
|
||||
style="width: 100%"
|
||||
size="mini"
|
||||
highlight-current-row
|
||||
height="200"
|
||||
>
|
||||
<el-table-column prop="order" :width="110" :label="this.$t('menu.serialNumber2')" />
|
||||
<el-table-column prop="date" :width="160" :label="this.$t('menu.time')" />
|
||||
<el-table-column prop="context" :width="180" :label="this.$t('menu.implementationProcess')" />
|
||||
<el-table-column prop="result" :label="this.$t('menu.executionResult')" />
|
||||
</el-table>
|
||||
<span class="notice">{{ message }}</span>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="2" :offset="3">
|
||||
<el-button :id="domIdCommand" type="primary" :disabled="cmdDisabled[0]" @click="command">{{ $t('menu.release') }}<span
|
||||
v-show="timeCountCommand>0"
|
||||
>({{ timeCountCommand }})</span></el-button>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="1">
|
||||
<el-button :id="domIdConfirm1" type="primary" style="width:120px;" :disabled="cmdDisabled[1]" @click="confirm1">{{ $t('menu.firstConfirm') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="2">
|
||||
<el-button :id="domIdConfirm2" type="primary" style="width:120px;" :disabled="cmdDisabled[2]" @click="confirm2">{{ $t('menu.secondConfirm') }}<span
|
||||
v-show="timeCountConfirm>0"
|
||||
>({{ timeCountConfirm }})</span></el-button>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="2">
|
||||
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">{{ $t('menu.suspend') }}</el-button>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="1">
|
||||
<el-button :id="domIdClose" @click="close">{{ $t('global.close') }}</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { now } from '@/utils/date';
|
||||
|
||||
export default {
|
||||
name: 'StationCmdControl',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
backOperate: '',
|
||||
order: 0,
|
||||
row: null,
|
||||
timer: null,
|
||||
operation: '',
|
||||
cmdDisabled: [true, true, true],
|
||||
stpDisabled: true,
|
||||
tempData: [],
|
||||
message: '',
|
||||
timeCountCommand: -1,
|
||||
timeCountConfirm: -1,
|
||||
stationName: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
typeList() {
|
||||
return [
|
||||
{ code: OperationEvent.Station.powerUnLock.menu.operation, name: this.$t('menu.menuStation.powerUnLock') },
|
||||
{ code: OperationEvent.Station.execKeyOperationTest.menu.operation, name: this.$t('menu.menuStation.execKeyOperationTest') }
|
||||
];
|
||||
},
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCommand() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
|
||||
/** 上电解锁*/
|
||||
return OperationEvent.Station.powerUnLock.order.domId;
|
||||
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
|
||||
/** 执行关键操作测试*/
|
||||
return OperationEvent.Station.execKeyOperationTest.order.domId;
|
||||
}
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdConfirm1() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
|
||||
/** 上电解锁*/
|
||||
return OperationEvent.Station.powerUnLock.confirm1.domId;
|
||||
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
|
||||
/** 执行关键操作测试*/
|
||||
return OperationEvent.Station.execKeyOperationTest.confirm1.domId;
|
||||
}
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdConfirm2() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
|
||||
/** 上电解锁*/
|
||||
return OperationEvent.Station.powerUnLock.confirm2.domId;
|
||||
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
|
||||
/** 执行关键操作测试*/
|
||||
return OperationEvent.Station.execKeyOperationTest.confirm2.domId;
|
||||
}
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdStop() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
|
||||
/** 上电解锁*/
|
||||
return OperationEvent.Station.powerUnLock.stop.domId;
|
||||
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
|
||||
/** 执行关键操作测试*/
|
||||
return OperationEvent.Station.execKeyOperationTest.stop.domId;
|
||||
}
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdClose() {
|
||||
if (this.dialogShow) {
|
||||
return OperationEvent.Command.close.menu.domId;
|
||||
}
|
||||
return '';
|
||||
},
|
||||
title() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
|
||||
return this.$t('menu.signalDeblocking');
|
||||
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
|
||||
return this.$t('menu.menuStation.execKeyOperationTest');
|
||||
}
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
cmdDisabled: {
|
||||
handler(val, oldVal) {
|
||||
this.stpDisabled = true;
|
||||
val.forEach((elem, index) => {
|
||||
// 在确定1之前的操作才可以终止
|
||||
if (elem == false && index >= 1 && index <= 2) {
|
||||
this.stpDisabled = false;
|
||||
}
|
||||
});
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
this.timer = setInterval(() => {
|
||||
if (!this.$store.state.menuOperation.break) {
|
||||
if (this.timeCountCommand > 0) {
|
||||
this.timeCountCommand--;
|
||||
} else if (this.timeCountCommand == 0) {
|
||||
this.setButtonEnable({ step: 0 });
|
||||
this.timeCountCommand = -1;
|
||||
}
|
||||
if (this.timeCountConfirm > 0) {
|
||||
this.timeCountConfirm--;
|
||||
} else if (this.timeCountConfirm == 0) {
|
||||
this.setButtonEnable({ step: 0 });
|
||||
this.timeCountConfirm = -1;
|
||||
}
|
||||
}
|
||||
}, 1000);
|
||||
},
|
||||
beforeDestroy() {
|
||||
clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
if (!this.dialogShow) {
|
||||
this.stationName = '';
|
||||
if (selected && selected._type.toUpperCase() === 'Station'.toUpperCase()) {
|
||||
this.stationName = selected.name;
|
||||
}
|
||||
|
||||
this.order = 0;
|
||||
this.operation = operate.operation;
|
||||
this.tempData = [];
|
||||
this.timeCountCommand = -1;
|
||||
this.timeCountConfirm = -1;
|
||||
this.cmdDisabled = [false, true, true];
|
||||
}
|
||||
this.stpDisabled = true;
|
||||
this.dialogShow = true;
|
||||
this.setMessage(this.$t('tip.releaseTip'));
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
command() {
|
||||
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation ||
|
||||
this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
|
||||
/** 第一步不带弹框处理*/
|
||||
this.commandNoPopUp();
|
||||
} else {
|
||||
/** 第一步带弹框处理*/
|
||||
this.commandHasPopUp();
|
||||
}
|
||||
},
|
||||
commandHasPopUp() {
|
||||
},
|
||||
commandNoPopUp() {
|
||||
const operate = {
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
|
||||
/** 上电解锁*/
|
||||
operate.operation = OperationEvent.Station.powerUnLock.order.operation;
|
||||
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
|
||||
/** 执行关键操作测试*/
|
||||
operate.operation = OperationEvent.Station.execKeyOperationTest.order.operation;
|
||||
}
|
||||
|
||||
this.setMessage(this.$t('tip.firstConfirmTip'));
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: '' });
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.setButtonEnable({ step: 1 });
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.executionSucceed') });
|
||||
} else {
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.executionFailed') });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.executionException') });
|
||||
});
|
||||
},
|
||||
confirm1() {
|
||||
const operate = {
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
|
||||
/** 上电解锁*/
|
||||
operate.operation = OperationEvent.Station.powerUnLock.confirm1.operation;
|
||||
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
|
||||
/** 执行关键操作测试*/
|
||||
operate.operation = OperationEvent.Station.execKeyOperationTest.confirm1.operation;
|
||||
}
|
||||
|
||||
this.setMessage(this.$t('tip.secondConfirmTip'));
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: '' });
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.timeCountCommand = -1;
|
||||
this.timeCountConfirm = 10;
|
||||
this.setButtonEnable({ step: 2 });
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: this.$t('tip.executionSucceed') });
|
||||
} else {
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: this.$t('tip.executionFailed') });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: this.$t('tip.executionException') });
|
||||
});
|
||||
},
|
||||
confirm2() {
|
||||
const operate = {
|
||||
over: true
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
|
||||
/** 上电解锁*/
|
||||
operate.operation = OperationEvent.Station.powerUnLock.confirm2.operation;
|
||||
// operate.cmdType = CMD.Station.powerUnLock;
|
||||
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
|
||||
/** 执行关键操作测试*/
|
||||
operate.operation = OperationEvent.Station.execKeyOperationTest.confirm2.operation;
|
||||
// operate.cmdType = CMD.Station.execKeyOperationTest;
|
||||
}
|
||||
|
||||
this.setMessage('');
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: '' });
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.timeCountCommand = -1;
|
||||
this.timeCountConfirm = -1;
|
||||
this.setButtonEnable({ step: -1 });
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: this.$t('tip.executionSucceed') });
|
||||
} else {
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: this.$t('tip.executionFailed') });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.timeCountCommand = -1;
|
||||
this.timeCountConfirm = -1;
|
||||
this.setButtonEnable({ step: -1 });
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: this.$t('tip.executionException') });
|
||||
});
|
||||
},
|
||||
stop() {
|
||||
const operate = {
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
|
||||
/** 上电解锁*/
|
||||
operate.operation = OperationEvent.Station.powerUnLock.stop.operation;
|
||||
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
|
||||
/** 执行关键操作测试*/
|
||||
operate.operation = OperationEvent.Station.execKeyOperationTest.stop.operation;
|
||||
}
|
||||
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSuspend'), result: '' });
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.setButtonEnable({ step: 0 });
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSuspend'), result: this.$t('tip.executionSucceed') });
|
||||
} else {
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSuspend'), result: this.$t('tip.executionFailed') });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSuspend'), result: this.$t('tip.executionException') });
|
||||
});
|
||||
},
|
||||
close() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.close.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
},
|
||||
getOperate(operate) {
|
||||
/** 弹框返回值处理*/
|
||||
},
|
||||
setButtonEnable(param) {
|
||||
this.cmdDisabled = [true, true, true];
|
||||
if (param && param.step >= 0) {
|
||||
this.cmdDisabled[param.step] = false;
|
||||
}
|
||||
},
|
||||
setMessage(message) {
|
||||
this.message = message;
|
||||
},
|
||||
writeRecord(param) {
|
||||
this.tempData.push(param);
|
||||
},
|
||||
editRecord(param) {
|
||||
this.tempData.forEach(elem => {
|
||||
if (elem.order == param.order) {
|
||||
for (var prop in param) {
|
||||
elem[prop] = param[prop];
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -0,0 +1,123 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="haerbin-01__systerm station-human-control-all"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="430px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<div class="context">
|
||||
<span>{{ title }}</span>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('global.confirm') }}</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="haerbin-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'StationHumanControlAll',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operation: null
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
return this.$t('menu.fullConcentrationStationAccessManualControl');
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Station.humanControlALL.menu.domId : '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Station.humanControlALL.menu.operation,
|
||||
cmdType: CMD.Station.CMD_STATION_CLOSE_AUTO_SETTING
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.station-human-control-all .context {
|
||||
padding-bottom: 40px !important;
|
||||
border: 1px solid lightgray;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,145 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="haerbin-01__systerm station-set-route-control-all"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="450px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<div style="padding: 0px 10px">
|
||||
<el-form ref="form" size="small" label-width="110px" label-position="left">
|
||||
<el-form-item :label="this.$t('menu.concentratedStationName')" prop="stationName">
|
||||
<el-input v-model="stationName" size="small" disabled />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-radio-group v-model="mode">
|
||||
<el-row>
|
||||
<el-radio :label="true">{{ $t('menu.checkConflict') }}</el-radio>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 20px">
|
||||
<el-radio :label="false">{{ $t('menu.notCheckConflict') }}</el-radio>
|
||||
</el-row>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('global.confirm') }}</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="haerbin-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'StationSetRouteControlAll',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operation: null,
|
||||
stationName: '',
|
||||
mode: true
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
return this.$t('menu.fullConcentrationStationSettingAccessControlMode');
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Station.atsAutoControlALL.menu.domId : '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
this.operation = operate.operation;
|
||||
this.stationName = '';
|
||||
if (selected) {
|
||||
this.stationName = selected.name;
|
||||
}
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Station.atsAutoControlALL.menu.operation,
|
||||
cmdType: CMD.Station.CMD_STATION_OPEN_AUTO_SETTING,
|
||||
val: this.mode,
|
||||
param: {
|
||||
CheckConflict: this.mode
|
||||
}
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.station-set-route-control-all .context {
|
||||
padding-bottom: 40px !important;
|
||||
border: 1px solid lightgray;
|
||||
}
|
||||
</style>
|
482
src/jmapNew/theme/nanjing_02/menus/dialog/switchCmdControl.vue
Normal file
482
src/jmapNew/theme/nanjing_02/menus/dialog/switchCmdControl.vue
Normal file
@ -0,0 +1,482 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="haerbin-01__systerm switch-cmd-control"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="840px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div style="padding: 10px 20px; border: 1px solid lightgray;">
|
||||
<span class="base-label">{{ $t('menu.commandInformation') }}</span>
|
||||
<el-form label-position="center" size="mini">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="this.$t('menu.type')" label-width="40px">
|
||||
<el-select v-model="operation" size="small" disabled>
|
||||
<el-option
|
||||
v-for="option in typeList"
|
||||
:key="option.code"
|
||||
:label="option.name"
|
||||
:value="option.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="this.$t('menu.stationName')" label-width="80px">
|
||||
<el-input v-model="stationName" size="small" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="this.$t('menu.switchName')" label-width="80px">
|
||||
<el-input v-model="switchName" size="small" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-table
|
||||
ref="tempData"
|
||||
class="table"
|
||||
:data="tempData"
|
||||
border
|
||||
style="width: 100%"
|
||||
size="mini"
|
||||
highlight-current-row
|
||||
height="200"
|
||||
>
|
||||
<el-table-column prop="order" :width="110" :label="this.$t('menu.serialNumber2')" />
|
||||
<el-table-column prop="date" :width="160" :label="this.$t('menu.time')" />
|
||||
<el-table-column prop="context" :width="180" :label="this.$t('menu.implementationProcess')" />
|
||||
<el-table-column prop="result" :label="this.$t('menu.executionResult')" />
|
||||
</el-table>
|
||||
<span class="notice">{{ message }}</span>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="2" :offset="3">
|
||||
<el-button :id="domIdCommand" type="primary" :disabled="cmdDisabled[0]" @click="command">{{ $t('menu.release') }}<span
|
||||
v-show="timeCountCommand>0"
|
||||
>({{ timeCountCommand }})</span></el-button>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="1">
|
||||
<el-button :id="domIdConfirm1" type="primary" style="width:120px;" :disabled="cmdDisabled[1]" @click="confirm1">{{ $t('menu.firstConfirm') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="2">
|
||||
<el-button :id="domIdConfirm2" type="primary" style="width:120px;" :disabled="cmdDisabled[2]" @click="confirm2">{{ $t('menu.secondConfirm') }}<span
|
||||
v-show="timeCountConfirm>0"
|
||||
>({{ timeCountConfirm }})</span></el-button>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="2">
|
||||
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">{{ $t('menu.suspend') }}</el-button>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="1">
|
||||
<el-button :id="domIdClose" @click="close">{{ $t('global.close') }}</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { now } from '@/utils/date';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'SwitchCmdControl',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
backOperate: '',
|
||||
selected: '',
|
||||
order: 0,
|
||||
row: null,
|
||||
timer: null,
|
||||
operation: '',
|
||||
cmdDisabled: [true, true, true],
|
||||
stpDisabled: true,
|
||||
tempData: [],
|
||||
message: '',
|
||||
timeCountCommand: -1,
|
||||
timeCountConfirm: -1,
|
||||
stationName: '',
|
||||
switchName: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
typeList() {
|
||||
return [
|
||||
{ code: OperationEvent.Switch.unlock.menu.operation, name: this.$t('menu.menuSwitch.switchUnlock') },
|
||||
{ code: OperationEvent.Switch.unblock.menu.operation, name: this.$t('menu.menuSwitch.switchSectionUnblock') },
|
||||
{ code: OperationEvent.Switch.fault.menu.operation, name: this.$t('menu.menuSwitch.switchMalfunctionUnlock') },
|
||||
{ code: OperationEvent.Switch.axlePreReset.menu.operation, name: this.$t('menu.menuSwitch.switchSectionAxisPreReset') }
|
||||
];
|
||||
},
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCommand() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
||||
/** 道岔单解*/
|
||||
return OperationEvent.Switch.unlock.order.domId;
|
||||
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
|
||||
/** 道岔解封*/
|
||||
return OperationEvent.Switch.unblock.order.domId;
|
||||
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
|
||||
/** 道岔故障解锁*/
|
||||
return OperationEvent.Switch.fault.order.domId;
|
||||
} else if (this.operation == OperationEvent.Switch.axlePreReset.menu.operation) {
|
||||
/** 道岔计轴复位*/
|
||||
return OperationEvent.Switch.axlePreReset.order.domId;
|
||||
}
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdConfirm1() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
||||
/** 道岔单解*/
|
||||
return OperationEvent.Switch.unlock.confirm1.domId;
|
||||
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
|
||||
/** 道岔解封*/
|
||||
return OperationEvent.Switch.unblock.confirm1.domId;
|
||||
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
|
||||
/** 道岔故障解锁*/
|
||||
return OperationEvent.Switch.fault.confirm1.domId;
|
||||
} else if (this.operation == OperationEvent.Switch.axlePreReset.menu.operation) {
|
||||
/** 道岔计轴复位*/
|
||||
return OperationEvent.Switch.axlePreReset.confirm1.domId;
|
||||
}
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdConfirm2() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
||||
/** 道岔单解*/
|
||||
return OperationEvent.Switch.unlock.confirm2.domId;
|
||||
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
|
||||
/** 道岔解封*/
|
||||
return OperationEvent.Switch.unblock.confirm2.domId;
|
||||
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
|
||||
/** 道岔故障解锁*/
|
||||
return OperationEvent.Switch.fault.confirm2.domId;
|
||||
} else if (this.operation == OperationEvent.Switch.axlePreReset.menu.operation) {
|
||||
/** 道岔计轴复位*/
|
||||
return OperationEvent.Switch.axlePreReset.confirm2.domId;
|
||||
}
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdStop() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
||||
/** 道岔单解*/
|
||||
return OperationEvent.Switch.unlock.stop.domId;
|
||||
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
|
||||
/** 道岔解封*/
|
||||
return OperationEvent.Switch.unblock.stop.domId;
|
||||
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
|
||||
/** 道岔故障解锁*/
|
||||
return OperationEvent.Switch.fault.stop.domId;
|
||||
} else if (this.operation == OperationEvent.Switch.axlePreReset.menu.operation) {
|
||||
/** 道岔计轴复位*/
|
||||
return OperationEvent.Switch.axlePreReset.stop.domId;
|
||||
}
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdClose() {
|
||||
if (this.dialogShow) {
|
||||
return OperationEvent.Command.close.menu.domId;
|
||||
}
|
||||
return '';
|
||||
},
|
||||
title() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
||||
return '道岔单解';
|
||||
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
|
||||
return '道岔解封';
|
||||
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
|
||||
return '道岔故障解锁';
|
||||
} else if (this.operation == OperationEvent.Switch.axlePreReset.menu.operation) {
|
||||
return '道岔计轴复位';
|
||||
}
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
cmdDisabled: {
|
||||
handler(val, oldVal) {
|
||||
this.stpDisabled = true;
|
||||
val.forEach((elem, index) => {
|
||||
// 在确定1之前的操作才可以终止
|
||||
if (elem == false && index >= 1 && index <= 2) {
|
||||
this.stpDisabled = false;
|
||||
}
|
||||
});
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
this.timer = setInterval(() => {
|
||||
if (!this.$store.state.menuOperation.break) {
|
||||
if (this.timeCountCommand > 0) {
|
||||
this.timeCountCommand--;
|
||||
} else if (this.timeCountCommand == 0) {
|
||||
this.setButtonEnable({ step: 0 });
|
||||
this.timeCountCommand = -1;
|
||||
}
|
||||
if (this.timeCountConfirm > 0) {
|
||||
this.timeCountConfirm--;
|
||||
} else if (this.timeCountConfirm == 0) {
|
||||
this.setButtonEnable({ step: 0 });
|
||||
this.timeCountConfirm = -1;
|
||||
}
|
||||
}
|
||||
}, 1000);
|
||||
},
|
||||
beforeDestroy() {
|
||||
clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
if (!this.dialogShow) {
|
||||
this.switchName = '';
|
||||
this.stationName = '';
|
||||
if (selected && selected._type.toUpperCase() === 'Switch'.toUpperCase()) {
|
||||
this.switchName = selected.name;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
this.selected = selected;
|
||||
}
|
||||
|
||||
this.order = 0;
|
||||
this.operation = operate.operation;
|
||||
this.dialogShow = true;
|
||||
this.tempData = [];
|
||||
this.timeCountCommand = -1;
|
||||
this.timeCountConfirm = -1;
|
||||
this.cmdDisabled = [false, true, true];
|
||||
}
|
||||
this.stpDisabled = true;
|
||||
this.setMessage(this.$t('tip.releaseTip'));
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
command() {
|
||||
/** 道岔单解/道岔解封/道岔故障解锁/道岔计轴复位*/
|
||||
if (this.operation == OperationEvent.Switch.unlock.menu.operation ||
|
||||
this.operation == OperationEvent.Switch.unblock.menu.operation ||
|
||||
this.operation == OperationEvent.Switch.fault.menu.operation ||
|
||||
this.operation == OperationEvent.Switch.axlePreReset.menu.operation ||
|
||||
this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
|
||||
/** 第一步不带弹框处理*/
|
||||
this.commandNoPopUp();
|
||||
} else {
|
||||
/** 第一步带弹框处理*/
|
||||
this.commandHasPopUp();
|
||||
}
|
||||
},
|
||||
commandHasPopUp() {
|
||||
|
||||
},
|
||||
commandNoPopUp() {
|
||||
const operate = {
|
||||
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
||||
/** 道岔单解*/
|
||||
operate.operation = OperationEvent.Switch.unlock.order.operation;
|
||||
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
|
||||
/** 道岔解封*/
|
||||
operate.operation = OperationEvent.Switch.unblock.order.operation;
|
||||
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
|
||||
/** 道岔故障解锁*/
|
||||
operate.operation = OperationEvent.Switch.fault.order.operation;
|
||||
} else if (this.operation == OperationEvent.Switch.axlePreReset.menu.operation) {
|
||||
/** 道岔计轴复位*/
|
||||
operate.operation = OperationEvent.Switch.axlePreReset.order.operation;
|
||||
}
|
||||
|
||||
this.setMessage(this.$t('tip.firstConfirmTip'));
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: '' });
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.setButtonEnable({ step: 1 });
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.executionSucceed') });
|
||||
} else {
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.executionFailed') });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.executionException') });
|
||||
});
|
||||
},
|
||||
confirm1() {
|
||||
const operate = {
|
||||
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
||||
/** 道岔单解*/
|
||||
operate.operation = OperationEvent.Switch.unlock.confirm1.operation;
|
||||
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
|
||||
/** 道岔解封*/
|
||||
operate.operation = OperationEvent.Switch.unblock.confirm1.operation;
|
||||
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
|
||||
/** 道岔故障解锁*/
|
||||
operate.operation = OperationEvent.Switch.fault.confirm1.operation;
|
||||
} else if (this.operation == OperationEvent.Switch.axlePreReset.menu.operation) {
|
||||
/** 道岔计轴复位*/
|
||||
operate.operation = OperationEvent.Switch.axlePreReset.confirm1.operation;
|
||||
}
|
||||
|
||||
this.setMessage(this.$t('tip.secondConfirmTip'));
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: '' });
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.timeCountCommand = -1;
|
||||
this.timeCountConfirm = 10;
|
||||
this.setButtonEnable({ step: 2 });
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: this.$t('tip.executionSucceed') });
|
||||
} else {
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: this.$t('tip.executionFailed') });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: this.$t('tip.executionException') });
|
||||
});
|
||||
},
|
||||
confirm2() {
|
||||
const operate = {
|
||||
over: true
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
||||
/** 道岔单解*/
|
||||
operate.operation = OperationEvent.Switch.unlock.confirm2.operation;
|
||||
operate.cmdType = CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK;
|
||||
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
|
||||
/** 道岔解封*/
|
||||
operate.operation = OperationEvent.Switch.unblock.confirm2.operation;
|
||||
operate.cmdType = CMD.Switch.CMD_SWITCH_UNBLOCK;
|
||||
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
|
||||
/** 道岔故障解锁*/
|
||||
operate.operation = OperationEvent.Switch.fault.confirm2.operation;
|
||||
operate.cmdType = CMD.Switch.CMD_SWITCH_FAULT_UNLOCK;
|
||||
} else if (this.operation == OperationEvent.Switch.axlePreReset.menu.operation) {
|
||||
/** 道岔计轴复位*/
|
||||
operate.operation = OperationEvent.Switch.axlePreReset.confirm2.operation;
|
||||
operate.cmdType = CMD.Switch.CMD_SWITCH_AXIS_PRE_RESET;
|
||||
}
|
||||
this.setMessage('');
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: '' });
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.timeCountCommand = -1;
|
||||
this.timeCountConfirm = -1;
|
||||
this.setButtonEnable({ step: -1 });
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: this.$t('tip.executionSucceed') });
|
||||
} else {
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: this.$t('tip.executionFailed') });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.timeCountCommand = -1;
|
||||
this.timeCountConfirm = -1;
|
||||
this.setButtonEnable({ step: -1 });
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: this.$t('tip.executionException') });
|
||||
});
|
||||
},
|
||||
stop() {
|
||||
const operate = {
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
||||
/** 道岔单解*/
|
||||
operate.operation = OperationEvent.Switch.unlock.stop.operation;
|
||||
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
|
||||
/** 道岔解封*/
|
||||
operate.operation = OperationEvent.Switch.unblock.stop.operation;
|
||||
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
|
||||
/** 道岔故障解锁*/
|
||||
operate.operation = OperationEvent.Switch.fault.stop.operation;
|
||||
} else if (this.operation == OperationEvent.Switch.axlePreReset.menu.operation) {
|
||||
/** 道岔计轴复位*/
|
||||
operate.operation = OperationEvent.Switch.axlePreReset.stop.operation;
|
||||
}
|
||||
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSuspend'), result: '' });
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.setButtonEnable({ step: 0 });
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSuspend'), result: this.$t('tip.executionSucceed') });
|
||||
} else {
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSuspend'), result: this.$t('tip.executionFailed') });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSuspend'), result: this.$t('tip.executionException') });
|
||||
});
|
||||
},
|
||||
close() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.close.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
},
|
||||
getOperate(operate) {
|
||||
/** 弹框返回值处理*/
|
||||
},
|
||||
setButtonEnable(param) {
|
||||
this.cmdDisabled = [true, true, true];
|
||||
if (param && param.step >= 0) {
|
||||
this.cmdDisabled[param.step] = false;
|
||||
}
|
||||
},
|
||||
setMessage(message) {
|
||||
this.message = message;
|
||||
},
|
||||
writeRecord(param) {
|
||||
this.tempData.push(param);
|
||||
},
|
||||
editRecord(param) {
|
||||
this.tempData.forEach(elem => {
|
||||
if (elem.order == param.order) {
|
||||
for (var prop in param) {
|
||||
elem[prop] = param[prop];
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
400
src/jmapNew/theme/nanjing_02/menus/dialog/trainControl.vue
Normal file
400
src/jmapNew/theme/nanjing_02/menus/dialog/trainControl.vue
Normal file
@ -0,0 +1,400 @@
|
||||
<template>
|
||||
<div v-if="dialogShow" id="faultChoose">
|
||||
<div class="falutChooseTitle">{{ title }}</div>
|
||||
<div class="closeFalutChoose" @click="doClose">
|
||||
<span class="el-icon-close closeFalutChooseIn" />
|
||||
</div>
|
||||
<div class="card" style="padding: 20px;">
|
||||
<el-row>
|
||||
<div style="padding: 0 10px;">
|
||||
<span>所选区段:</span>
|
||||
<el-input v-model="sectionCode" style="display: inline-block;width: 200px;" :disabled="true" size="small" />
|
||||
</div>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<div style="display: flex;justify-content: space-between;padding: 10px 20px;border: 1px solid #DCDAC9;border-radius: 6px;">
|
||||
<el-button size="small" @click="changeMode('show')">显示列车</el-button>
|
||||
<el-button size="small" @click="changeMode('edit')">编辑列车</el-button>
|
||||
<el-button size="small" :disabled="true">创建列车</el-button>
|
||||
<el-button size="small" :disabled="true">删除列车</el-button>
|
||||
<el-button size="small" :disabled="true">步进列车</el-button>
|
||||
</div>
|
||||
</el-row>
|
||||
<el-row v-if="controlMode === 'show'" style="padding: 10px;">
|
||||
<el-table :data="tempTableData" style="width: 100%" border height="300">
|
||||
<el-table-column prop="date" label="方向">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.right? '右行':'左行' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="tripNumber" label="车次号">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.serviceNumber+scope.row.destinationCode+(scope.row.tripNumber.substring(1)) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="groupNumber" label="车组号" />
|
||||
<el-table-column prop="sectionModel.name" label="位置" />
|
||||
<el-table-column prop="date" label="自排状态">
|
||||
<template slot-scope="scope">
|
||||
<span>√</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="dt" label="晚点(秒)" />
|
||||
</el-table>
|
||||
</el-row>
|
||||
<el-row v-if="controlMode === 'edit'">
|
||||
<el-col :span="6">
|
||||
<el-table :data="tempTableData" style="width: 100%" height="300">
|
||||
<el-table-column prop="date" label="方向">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.right? '>':'<' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="tripNumber" label="车次号">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.destinationCode+scope.row.serviceNumber+(scope.row.tripNumber.substring(1)) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-col>
|
||||
<el-col :span="17" :offset="1">
|
||||
<div style="margin-top: 30px;">
|
||||
<div style="display: inline-block;width: 150px;">选择的车次号:</div>
|
||||
<el-input v-model="tripNum" style="display: inline-block;width: 200px;" :disabled="true" size="small" />
|
||||
</div>
|
||||
<div>
|
||||
<div style="display: inline-block;width: 150px;">新的车次号:</div>
|
||||
<el-input v-model="newTripNum" style="display: inline-block;width: 200px;" size="small" />
|
||||
<div v-if="newTripNumError" style="font-size: 10px;color: #F00;margin-left: 160px;height: 10px;line-height: 10px;"> 请输入正确的车次号</div>
|
||||
</div>
|
||||
<div>
|
||||
<div style="display: inline-block;width: 150px;">自动排列:</div>
|
||||
<el-radio v-model="autoArrange" style="display: inline-block;" :label="true" :disabled="true">开</el-radio>
|
||||
<el-radio v-model="autoArrange" style="display: inline-block;" :label="false" :disabled="true">关</el-radio>
|
||||
</div>
|
||||
<div>
|
||||
<div style="display: inline-block;width: 150px;">车组号:</div>
|
||||
<el-input v-model="groupNum" style="display: inline-block;width: 200px;" :disabled="true" size="small" />
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div style="text-align: right;">
|
||||
<el-button v-if="controlMode==='edit'" size="small" @click="commit">执行</el-button>
|
||||
<el-button size="small" @click="doClose">关闭</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<notice-info ref="noticeInfo" pop-class="haerbin-01__systerm" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
// 故障列表
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
export default {
|
||||
name: 'FaultChoose',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
props: {
|
||||
offset: {
|
||||
type: Number,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
isAdd:false,
|
||||
controlMode: 'show',
|
||||
autoArrange: true,
|
||||
deviceMap: {},
|
||||
sectionCode: '',
|
||||
simulationFault:{},
|
||||
faultList: [],
|
||||
faultRule:{
|
||||
targetDeviceCode:'',
|
||||
targetDeviceType:'',
|
||||
faultType:'',
|
||||
condition:{
|
||||
triggerDeviceCode:'',
|
||||
triggerDeviceStatus:'',
|
||||
triggerDeviceType :'',
|
||||
type:'DEVICE',
|
||||
triggerTime: '',
|
||||
triggerAssociatedDeviceCode: ''
|
||||
}
|
||||
},
|
||||
triggerDevice:'',
|
||||
triggerAssociatedDevice: '',
|
||||
triggerMode: 'DEVICE',
|
||||
triggerModeList: [
|
||||
{label: '设备触发', value: 'DEVICE'},
|
||||
{label: '时间触发', value: 'TIME'}
|
||||
],
|
||||
field:'',
|
||||
triggerStatusList:[],
|
||||
faultTypeList:[],
|
||||
targetDeviceName: '',
|
||||
tempTableData: [],
|
||||
tripNum: '',
|
||||
groupNum: '',
|
||||
newTripNum: '',
|
||||
newTripNumError: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return '列车监控和追踪';
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
'$store.state.menuOperation.selectedCount':function(em) {
|
||||
const device = this.$store.state.menuOperation.selected;
|
||||
if (device && device.code && device.deviceType === 'TRAIN') {
|
||||
this.tempTableData = [device];
|
||||
this.sectionCode = device.sectionModel.name;
|
||||
this.tripNum = device.destinationCode + device.serviceNumber + (device.tripNumber.substring(1));
|
||||
this.groupNum = device.groupNumber;
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
doShow() {
|
||||
this.dialogShow = true;
|
||||
this.tempTableData = [];
|
||||
this.sectionCode = '';
|
||||
this.controlMode = 'show';
|
||||
this.tripNum = '';
|
||||
this.groupNum = '';
|
||||
this.newTripNum = '';
|
||||
this.newTripNumError = false;
|
||||
this.$nextTick(()=>{
|
||||
this.dragEvent();
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
},
|
||||
changeMode(val) {
|
||||
this.controlMode = val;
|
||||
},
|
||||
commit() {
|
||||
this.newTripNumError = false;
|
||||
if (this.newTripNum && this.newTripNum.length === 8) {
|
||||
const params = {
|
||||
groupNumber: this.groupNum,
|
||||
tripNumber: '0' + this.newTripNum.slice(6, 8),
|
||||
serviceNumber: this.newTripNum.slice(3, 6)
|
||||
};
|
||||
const step = {
|
||||
over: true,
|
||||
cmdType: CMD.TrainWindow.CMD_TRAIN_SET_PLAN,
|
||||
operation: OperationEvent.Train.setPlanTrainId.menu.operation,
|
||||
param: params
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.tempTableData = [];
|
||||
this.sectionCode = '';
|
||||
this.tripNum = '';
|
||||
this.groupNum = '';
|
||||
this.newTripNum = '';
|
||||
this.newTripNumError = false;
|
||||
}
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
this.newTripNumError = true;
|
||||
}
|
||||
},
|
||||
dragEvent() {
|
||||
const offset = this.offset;
|
||||
const dialogHeaderEl = document.querySelector('.falutChooseTitle');
|
||||
const dragDom = document.querySelector('#faultChoose');
|
||||
dialogHeaderEl.style.cursor = 'move';
|
||||
|
||||
/** 获取原有属性 ie dom元素.currentStyle 火狐谷歌 window.getComputedStyle(dom元素, null);*/
|
||||
const sty = dragDom.currentStyle || window.getComputedStyle(dragDom, null);
|
||||
|
||||
dialogHeaderEl.onmousedown = (e) => {
|
||||
/** 鼠标按下,计算当前元素距离可视区的距离*/
|
||||
const disX = e.clientX - dialogHeaderEl.offsetLeft;
|
||||
const disY = e.clientY - dialogHeaderEl.offsetTop;
|
||||
|
||||
/** 获取到的值带px 正则匹配替换*/
|
||||
let styL, styT;
|
||||
|
||||
/** 注意在ie中 第一次获取到的值为组件自带50% 移动之后赋值为px*/
|
||||
if (sty.left.includes('%')) {
|
||||
// eslint-disable-next-line no-useless-escape
|
||||
styL = +document.body.clientWidth * (+sty.left.replace(/\%/g, '') / 100);
|
||||
styT = +document.body.clientHeight * (+sty.top.replace(/\%/g, '') / 100);
|
||||
} else {
|
||||
// eslint-disable-next-line no-useless-escape
|
||||
styL = +sty.left.replace(/\px/g, '');
|
||||
// eslint-disable-next-line no-useless-escape
|
||||
styT = +sty.top.replace(/\px/g, '');
|
||||
}
|
||||
|
||||
document.onmousemove = function (e) {
|
||||
/** 通过事件委托,计算移动的距离*/
|
||||
const l = e.clientX - disX;
|
||||
const t = e.clientY - disY;
|
||||
|
||||
/** 移动当前元素*/
|
||||
// dragDom.style.left = `${l + styL}px`;
|
||||
// dragDom.style.top = `${t + styT}px`;
|
||||
|
||||
/** 移动当前元素*/
|
||||
if (l + styL < 0) {
|
||||
dragDom.style.left = `0px`;
|
||||
} else if (l + styL > document.body.clientWidth - dragDom.clientWidth - 10) {
|
||||
dragDom.style.left = `${document.body.clientWidth - dragDom.clientWidth - 10}px`;
|
||||
} else {
|
||||
dragDom.style.left = `${l + styL}px`;
|
||||
}
|
||||
if (t + styT <= offset) {
|
||||
dragDom.style.top = offset + `px`;
|
||||
} else if (t + styT > document.body.clientHeight - dragDom.clientHeight - 10) {
|
||||
dragDom.style.top = `${document.body.clientHeight - dragDom.clientHeight - 10}px`;
|
||||
} else {
|
||||
dragDom.style.top = `${t + styT}px`;
|
||||
}
|
||||
|
||||
/** 将此时的位置传出去*/
|
||||
// binding.value({ x: e.pageX, y: e.pageY });
|
||||
};
|
||||
|
||||
document.onmouseup = function () {
|
||||
document.onmousemove = null;
|
||||
document.onmouseup = null;
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
#faultChoose .card .queryList .el-card .el-card__body .el-table--border .el-table__body-wrapper{
|
||||
height: 135px !important;
|
||||
overflow-y: auto !important;
|
||||
}
|
||||
#faultChoose .el-button--mini {
|
||||
margin-left: 5px;
|
||||
}
|
||||
.triggerFaultListLeft{
|
||||
display: inline-block;
|
||||
float: left;
|
||||
width: 730px;
|
||||
}
|
||||
// 谷歌、safari、qq浏览器、360浏览器滚动条样式
|
||||
// 定义滚动条高宽及背景 高宽分别对应横竖滚动条的尺寸
|
||||
#faultChoose .el-table__body-wrapper::-webkit-scrollbar {
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
// height: 110px;
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
/*定义滚动条轨道 内阴影+圆角*/
|
||||
#faultChoose .el-table__body-wrapper::-webkit-scrollbar-track {
|
||||
// box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
|
||||
border-radius: 10px;
|
||||
background-color: #FFFFFF;;
|
||||
}
|
||||
/*定义滑块 内阴影+圆角*/
|
||||
#faultChoose .el-table__body-wrapper::-webkit-scrollbar-thumb {
|
||||
border-radius: 10px;
|
||||
// box-shadow: inset 0 0 6px rgba(0,0,0,.3);
|
||||
background-color: #eaeaea;
|
||||
}
|
||||
/*滑块效果*/
|
||||
#faultChoose .el-table__body-wrapper::-webkit-scrollbar-thumb:hover {
|
||||
border-radius: 5px;
|
||||
// box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
|
||||
background: rgba(0,0,0,0.4);
|
||||
}
|
||||
/*IE滚动条颜色*/
|
||||
html {
|
||||
scrollbar-face-color:#bfbfbf;/*滚动条颜色*/
|
||||
scrollbar-highlight-color:#000;
|
||||
scrollbar-3dlight-color:#000;
|
||||
scrollbar-darkshadow-color:#000;
|
||||
scrollbar-Shadow-color:#adadad;/*滑块边色*/
|
||||
scrollbar-arrow-color:rgba(0,0,0,0.4);/*箭头颜色*/
|
||||
scrollbar-track-color:#eeeeee;/*背景颜色*/
|
||||
}
|
||||
</style>
|
||||
<style scoped rel="stylesheet/scss" lang="scss">
|
||||
.triggerFaultInfo{
|
||||
margin-bottom:10px;
|
||||
padding: 10px 0px 10px 15px;
|
||||
}
|
||||
.triggerFaultList{
|
||||
font-size: 14px;
|
||||
margin-top: 10px;
|
||||
line-height: 20px;
|
||||
}
|
||||
.triggerFaultTitle{
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.falutChooseTitle{
|
||||
cursor: all-scroll;
|
||||
background-color: #0054E5;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
color: #fff;
|
||||
padding-left: 10px;
|
||||
border-radius: 6px 6px 0 0;
|
||||
}
|
||||
#faultChoose{
|
||||
width: 1000px;
|
||||
position: absolute;
|
||||
left: 30%;
|
||||
top: 20%;
|
||||
padding:0px 0px 15px 0px;
|
||||
// transform: translate3d(-50%,-50%,0);
|
||||
border-radius: 6px;
|
||||
z-index:999;
|
||||
background-color: #ECE9D8;
|
||||
}
|
||||
.faultChooseFoot{
|
||||
display: inline-block;
|
||||
float: right;
|
||||
margin-right: 20px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.closeFalutChoose{
|
||||
position: absolute;
|
||||
right: 0px;
|
||||
top: 0px;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
cursor: pointer;
|
||||
line-height: 30px;
|
||||
}
|
||||
.closeFalutChooseIn{
|
||||
font-size: 20px;
|
||||
margin-left: 5px;
|
||||
background-color: #f00;
|
||||
color: #FFF;
|
||||
border: 1px solid #fff;
|
||||
border-radius: 5px;
|
||||
}
|
||||
/deep/ .el-table th{
|
||||
background-color: #ECE9D8;
|
||||
padding: 0;
|
||||
}
|
||||
/deep/.el-table td{
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
155
src/jmapNew/theme/nanjing_02/menus/dialog/trainCreate.vue
Normal file
155
src/jmapNew/theme/nanjing_02/menus/dialog/trainCreate.vue
Normal file
@ -0,0 +1,155 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag class="haerbin-01__systerm route-create" :title="title" :visible.sync="show" width="380px" label-position="top" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||
<div style="padding: 10px 20px; border: 1px solid lightgray;">
|
||||
<el-form size="small" label-width="100px">
|
||||
<el-form-item :label="this.$t('menu.train')+this.$t('global.colon')" prop="trainCode">
|
||||
<el-select v-model="trainCode" filterable :placeholder="this.$t('menu.train')">
|
||||
<el-option
|
||||
v-for="item in trainList"
|
||||
:key="item.code"
|
||||
:label="item.groupNumber"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="列车车次:" prop="tripNumber">
|
||||
<el-select v-model="tripNumber" filterable placeholder="列车车次">
|
||||
<el-option v-for="no in trainNoList" :key="no" :label="no" :value="no"></el-option>
|
||||
</el-select>
|
||||
<div style="font-size: 12px;">(上行路线车次号选择偶数,下行路线车次号选择基数)</div>
|
||||
</el-form-item> -->
|
||||
<el-form-item :label="this.$t('menu.trainDirection')+this.$t('global.colon')" prop="direction">
|
||||
<el-select v-model="direction" filterable :placeholder="this.$t('menu.trainDirection')">
|
||||
<el-option v-for="no in directionList" :key="no.value" :label="no.label" :value="no.value" />
|
||||
</el-select>
|
||||
<!-- <div style="font-size: 12px;">(上行路线车次号选择偶数,下行路线车次号选择基数)</div> -->
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row>
|
||||
<el-col style="text-align: right;">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ this.$t('global.confirm') }}</el-button>
|
||||
<el-button :id="domIdCancel" @click="cancel">{{ this.$t('global.cancel') }}</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<notice-info ref="noticeInfo" pop-class="haerbin-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'RouteCreate',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
trainList: [],
|
||||
trainNoList: [],
|
||||
directionList: [
|
||||
{
|
||||
value: '2',
|
||||
label: this.$t('menu.up')
|
||||
},
|
||||
{
|
||||
value: '1',
|
||||
label: this.$t('menu.down')
|
||||
}
|
||||
],
|
||||
trainCode: '',
|
||||
tripNumber: '',
|
||||
direction: '',
|
||||
selected: null
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'map'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return OperationEvent.Section.newtrain.menu.domId;
|
||||
},
|
||||
title() {
|
||||
return this.$t('menu.settingTrain');
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
loadInitData(map) {
|
||||
if (map.trainList.length) {
|
||||
this.trainList = map.trainList;
|
||||
} else {
|
||||
this.$messageBox(this.$t('error.getTrainListFailed'));
|
||||
}
|
||||
},
|
||||
doShow(operate, selected) {
|
||||
this.dialogShow = true;
|
||||
this.selected = selected;
|
||||
/** 加载列车数据*/
|
||||
this.loadInitData(this.map);
|
||||
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.trainCode = '';
|
||||
this.direction = '';
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
send: true,
|
||||
|
||||
operation: OperationEvent.Section.newtrain.menu.operation,
|
||||
cmdType: CMD.Section.CMD_NEW_TRAIN,
|
||||
val: '' + this.direction + '::' + this.trainCode
|
||||
};
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
167
src/jmapNew/theme/nanjing_02/menus/dialog/trainDelete.vue
Normal file
167
src/jmapNew/theme/nanjing_02/menus/dialog/trainDelete.vue
Normal file
@ -0,0 +1,167 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="haerbin-01__systerm stand-stop-time"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="320px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form ref="form" size="small" label-width="90px" :model="formModel" :rules="rules">
|
||||
<el-form-item :label="this.$t('menu.groupNumber')+this.$t('global.colon')" prop="groupNumber">
|
||||
<el-input :id="domIdTrainNumber" v-model="formModel.groupNumber" @change="trainNumberChange" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('global.confirm') }}</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<confirm-control ref="confirmControl" />
|
||||
<notice-info ref="noticeInfo" pop-class="haerbin-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
// import { getPublishMapTrainNos } from '@/api/runplan';
|
||||
import ConfirmControl from './childDialog/confirmControl';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'TrainDelete',
|
||||
components: {
|
||||
ConfirmControl,
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
formModel: {
|
||||
groupNumber: ''
|
||||
},
|
||||
|
||||
rules: {
|
||||
groupNumber: [
|
||||
{ required: true, message: this.$t('rules.selectGroupNumber'), trigger: 'blur' }
|
||||
]
|
||||
},
|
||||
operation: null,
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'map'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Train.delTrainId.menu.domId : '';
|
||||
},
|
||||
domIdTrainNumber() {
|
||||
return this.dialogShow ? OperationEvent.Train.delTrainId.trainNumberChange.domId : '';
|
||||
},
|
||||
title() {
|
||||
return this.$t('menu.menuTrain.deleteTrainId');
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
loadInitData(map) {
|
||||
if (map) {
|
||||
// getPublishMapTrainNos(map.skinCode).then(response => {
|
||||
// this.trainNoList = response.data;
|
||||
// }).catch(() => {
|
||||
// this.$messageBox(`获取列车车组号失败`);
|
||||
// });
|
||||
}
|
||||
},
|
||||
doShow(operate, selected) {
|
||||
// 如果不是断点激活,则需要对初始值进行初始化
|
||||
if (!this.dialogShow) {
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
},
|
||||
trainNumberChange() {
|
||||
const operate = {
|
||||
|
||||
val: `${this.formModel.groupNumber}`,
|
||||
operation: OperationEvent.Train.delTrainId.trainNumberChange.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
send: true,
|
||||
|
||||
operation: OperationEvent.Train.delTrainId.menu.operation,
|
||||
cmdType: CMD.Train.CMD_DEL_TRAIN_ID,
|
||||
val: this.formModel.groupNumber
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
138
src/jmapNew/theme/nanjing_02/menus/dialog/trainEditNumber.vue
Normal file
138
src/jmapNew/theme/nanjing_02/menus/dialog/trainEditNumber.vue
Normal file
@ -0,0 +1,138 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="haerbin-01__systerm stand-stop-time"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="320px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form ref="form" size="small" label-width="120px" :model="addModel" :rules="rules">
|
||||
<el-form-item :label="this.$t('menu.groupNumber')+this.$t('global.colon')" label-width="120px" prop="tripNumber">
|
||||
<el-input v-model="addModel.tripNumber" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('global.confirm') }}</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'TrainMove',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
addModel: {
|
||||
tripNumber: ''
|
||||
},
|
||||
|
||||
rules: {
|
||||
tripNumber: [
|
||||
{ required: true, message: this.$t('rules.selectGroupNumber'), trigger: 'blur' }
|
||||
]
|
||||
},
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Train.editTrainNo.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return this.$t('menu.menuTrain.editTrainNo');
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
send: true,
|
||||
|
||||
operation: OperationEvent.Train.editTrainNo.menu.operation,
|
||||
cmdType: CMD.Train.CMD_EDIT_TRAIN_NO
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.haerbin-01__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -18px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
</style>
|
201
src/jmapNew/theme/nanjing_02/menus/dialog/trainMove.vue
Normal file
201
src/jmapNew/theme/nanjing_02/menus/dialog/trainMove.vue
Normal file
@ -0,0 +1,201 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="haerbin-01__systerm stand-stop-time"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="640px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form ref="form" size="small" label-width="80px" :model="addModel" :rules="rules">
|
||||
<div style="width: 46%;">
|
||||
<el-form-item :label="this.$t('menu.groupNumber')+this.$t('global.colon')" label-width="95px" prop="tripNumber">
|
||||
<el-input v-model="addModel.tripNumber" disabled />
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div style="overflow: hidden;">
|
||||
<div
|
||||
style="width: 48%; float: left; padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px; margin-right: 4%;"
|
||||
>
|
||||
<span class="base-label">{{ $t('menu.sourceTrainWindow') }}</span>
|
||||
<div style="position: relative; top:-10px;">
|
||||
<el-form-item prop="stationStandSource">
|
||||
<span slot="label">{{ $t('menu.station') + $t('global.colon') }}</span>
|
||||
<el-select v-model="addModel.stationStandSource" filterable :placeholder="this.$t('global.choose')">
|
||||
<el-option
|
||||
v-for="item in stationStandList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="this.$t('menu.trainWindow')+this.$t('global.colon')" prop="trainSource">
|
||||
<el-input v-model="addModel.trainSource" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
style="width: 48%; float: left; padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px;"
|
||||
>
|
||||
<span class="base-label">{{ $t('menu.targetTrainWindow') }}</span>
|
||||
<div style="position: relative; top:-10px;">
|
||||
<el-form-item prop="stationStandGoal">
|
||||
<span slot="label">{{ $t('menu.station') + $t('global.colon') }}</span>
|
||||
<el-select v-model="addModel.stationStandGoal" filterable :placeholder="this.$t('global.choose')">
|
||||
<el-option
|
||||
v-for="item in stationStandList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="this.$t('menu.trainWindow')+this.$t('global.colon')" prop="trainGoal">
|
||||
<el-input v-model="addModel.trainGoal" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-form>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('global.confirm') }}</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'TrainMove',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
addModel: {
|
||||
tripNumber: '',
|
||||
trainSource: '',
|
||||
stationStandSource: '',
|
||||
trainGoal: '',
|
||||
stationStandGoal: ''
|
||||
},
|
||||
|
||||
rules: {
|
||||
tripNumber: [
|
||||
{ required: true, message: this.$t('rules.selectGroupNumber'), trigger: 'blur' }
|
||||
],
|
||||
trainSource: [
|
||||
{ required: true, message: this.$t('rules.enterTheTripNumber'), trigger: 'blur' }
|
||||
],
|
||||
stationStandSource: [
|
||||
{ required: true, message: this.$t('rules.selectStation'), trigger: 'change' }
|
||||
],
|
||||
trainGoal: [
|
||||
{ required: true, message: this.$t('rules.enterTheTripNumber'), trigger: 'blur' }
|
||||
],
|
||||
stationStandGoal: [
|
||||
{ required: true, message: this.$t('rules.selectStation'), trigger: 'change' }
|
||||
]
|
||||
},
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Train.moveTrainId.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return this.$t('menu.menuTrain.moveTrainId');
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
send: true,
|
||||
|
||||
operation: OperationEvent.Train.moveTrainId.menu.operation,
|
||||
cmdType: CMD.Train.CMD_MOVE_TRAIN_ID
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
// this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.haerbin-01__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -18px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
</style>
|
206
src/jmapNew/theme/nanjing_02/menus/dialog/trainSwitch.vue
Normal file
206
src/jmapNew/theme/nanjing_02/menus/dialog/trainSwitch.vue
Normal file
@ -0,0 +1,206 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="haerbin-01__systerm stand-stop-time"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="640px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form ref="form" size="small" label-width="80px" :model="addModel" :rules="rules">
|
||||
<div style="overflow: hidden;">
|
||||
<div
|
||||
style="width: 48%; float: left; padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 177px; margin-right: 4%;"
|
||||
>
|
||||
<span class="base-label">{{ $t('menu.sourceTrainWindow') }}</span>
|
||||
<div style="position: relative; top:-10px;">
|
||||
<el-form-item :label="this.$t('menu.groupNumber')+this.$t('global.colon')" prop="trainNumberSource">
|
||||
<el-input v-model="addModel.trainNumberSource" />
|
||||
</el-form-item>
|
||||
<el-form-item prop="stationStandSource">
|
||||
<span slot="label">{{ $t('menu.station') + $t('global.colon') }}</span>
|
||||
<el-select v-model="addModel.stationStandSource" filterable :placeholder="this.$t('global.choose')">
|
||||
<el-option
|
||||
v-for="item in stationStandList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="this.$t('menu.trainWindow')+this.$t('global.colon')" prop="trainSource">
|
||||
<el-input v-model="addModel.trainSource" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
style="width: 48%; float: left; padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 177px;"
|
||||
>
|
||||
<span class="base-label">{{ $t('menu.targetTrainWindow') }}</span>
|
||||
<div style="position: relative; top:-10px;">
|
||||
<el-form-item :label="this.$t('menu.groupNumber')+this.$t('global.colon')" prop="trainNumberGoal">
|
||||
<el-input v-model="addModel.trainNumberGoal" />
|
||||
</el-form-item>
|
||||
<el-form-item prop="stationStandGoal">
|
||||
<span slot="label">{{ $t('menu.station') + $t('global.colon') }}</span>
|
||||
<el-select v-model="addModel.stationStandGoal" filterable :placeholder="this.$t('global.choose')">
|
||||
<el-option
|
||||
v-for="item in stationStandList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="this.$t('menu.trainWindow')+this.$t('global.colon')" prop="trainGoal">
|
||||
<el-input v-model="addModel.trainGoal" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-form>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('global.confirm') }}</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'TrainSwitch',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
addModel: {
|
||||
trainNumberSource: '',
|
||||
trainSource: '',
|
||||
stationStandSource: '',
|
||||
trainGoal: '',
|
||||
stationStandGoal: '',
|
||||
trainNumberGoal: ''
|
||||
},
|
||||
|
||||
rules: {
|
||||
trainNumberSource: [
|
||||
{ required: true, message: this.$t('rules.selectGroupNumber'), trigger: 'blur' }
|
||||
],
|
||||
trainSource: [
|
||||
{ required: true, message: this.$t('rules.enterTheTripNumber'), trigger: 'blur' }
|
||||
],
|
||||
stationStandSource: [
|
||||
{ required: true, message: this.$t('rules.selectStation'), trigger: 'change' }
|
||||
],
|
||||
trainNumberGoal: [
|
||||
{ required: true, message: this.$t('rules.selectGroupNumber'), trigger: 'blur' }
|
||||
],
|
||||
trainGoal: [
|
||||
{ required: true, message: this.$t('rules.enterTheTripNumber'), trigger: 'blur' }
|
||||
],
|
||||
stationStandGoal: [
|
||||
{ required: true, message: this.$t('rules.selectStation'), trigger: 'change' }
|
||||
]
|
||||
},
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Train.moveTrainId.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return this.$t('menu.menuTrain.switchTrainId');
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
send: true,
|
||||
|
||||
operation: OperationEvent.Train.moveTrainId.menu.operation,
|
||||
cmdType: CMD.Train.CMD_MOVE_TRAIN_ID
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
// this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.haerbin-01__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -18px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
</style>
|
369
src/jmapNew/theme/nanjing_02/menus/index.vue
Normal file
369
src/jmapNew/theme/nanjing_02/menus/index.vue
Normal file
@ -0,0 +1,369 @@
|
||||
<template>
|
||||
<div class="menus" :style="{width: width + 'px'}">
|
||||
<menu-bar v-if="$store.state.training.prdType === '01' || $store.state.training.prdType === '02'" ref="menuBar" :selected="selected" />
|
||||
<menu-station-stand ref="menuStationStand" :selected="selected" />
|
||||
<menu-train ref="menuTrain" :selected="selected" />
|
||||
<menu-signal ref="menuSignal" :selected="selected" />
|
||||
<menu-switch ref="menuSwitch" :selected="selected" />
|
||||
<menu-section ref="menuSection" :selected="selected" />
|
||||
<menu-station ref="menuStation" :selected="selected" />
|
||||
<menu-button v-if="isShowButton" ref="menuButton" :selected="selected" />
|
||||
<passive-alarm ref="passiveAlarm" />
|
||||
<passive-contorl ref="passiveControl" pop-class="haerbin-01__systerm" />
|
||||
<passive-Timeout ref="passiveTimeout" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import MenuTrain from './menuTrain';
|
||||
import MenuBar from './menuBar';
|
||||
import MenuButton from './menuButton';
|
||||
import MenuSignal from './menuSignal';
|
||||
import MenuSwitch from './menuSwitch';
|
||||
import MenuSection from './menuSection';
|
||||
import MenuStation from './menuStation';
|
||||
import MenuStationStand from './menuStationStand';
|
||||
import PassiveAlarm from './passiveDialog/alarm';
|
||||
import PassiveContorl from '@/jmapNew/theme/components/menus/passiveDialog/control';
|
||||
import PassiveTimeout from './passiveDialog/timeout';
|
||||
|
||||
export default {
|
||||
name: 'Menus',
|
||||
components: {
|
||||
MenuBar,
|
||||
MenuButton,
|
||||
MenuTrain,
|
||||
MenuSignal,
|
||||
MenuSwitch,
|
||||
MenuSection,
|
||||
MenuStation,
|
||||
MenuStationStand,
|
||||
PassiveAlarm,
|
||||
PassiveContorl,
|
||||
PassiveTimeout
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('config', [
|
||||
'width'
|
||||
]),
|
||||
isShowButton() {
|
||||
return this.$store.state.training.prdType === '01' || this.$store.state.training.prdType === '02';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
isShowBar(val) {
|
||||
val && this.$store.dispatch('config/updateMenuBar');
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('config/updateMenuBar');
|
||||
});
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.menus .pop-menu {
|
||||
background: #F0F0F0;
|
||||
}
|
||||
|
||||
.menus .pop-menu span {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.menus .pop-menu .is-disabled span {
|
||||
color: #B4B3B8;
|
||||
}
|
||||
|
||||
.haerbin-01__systerm {
|
||||
overflow: hidden !important;
|
||||
}
|
||||
|
||||
.haerbin-01__systerm .el-dialog {
|
||||
background: rgba(100, 100, 100, 0.3);
|
||||
border: 2px solid rgb(144, 144, 144, 0.8);
|
||||
border-radius: 6px;
|
||||
color: #000;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.haerbin-01__systerm .el-dialog .el-dialog__header {
|
||||
padding: 5px;
|
||||
height: 26px;
|
||||
}
|
||||
|
||||
.haerbin-01__systerm .el-dialog .el-dialog__footer {
|
||||
background: #F0F0F0;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.haerbin-01__systerm .el-dialog .el-dialog__body {
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
padding-left: 5px;
|
||||
padding-right: 5px;
|
||||
margin: 0px 5px 5px;
|
||||
border: 2px solid rgba(120, 121, 123, 0.5);
|
||||
box-shadow: 1px hsla(240, 0%, 100%, 0.5) inset;
|
||||
background: #F0F0F0;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.haerbin-01__systerm .el-dialog .el-dialog__title {
|
||||
position: absolute;
|
||||
top: 4px;
|
||||
color: #000;
|
||||
border-radius: 4px;
|
||||
padding: 0px 2px;
|
||||
height: 20px;
|
||||
line-height: 20px
|
||||
}
|
||||
|
||||
.haerbin-01__systerm .el-dialog .el-dialog__title::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
-webkit-filter: blur(10px);
|
||||
filter: blur(10px);
|
||||
height: 20px;
|
||||
width: -webkit-fill-available;
|
||||
background: rgba(128, 128, 128, 0.8);
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
.haerbin-01__systerm .el-dialog .el-dialog__headerbtn {
|
||||
background: linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770);
|
||||
border: 1px solid #fff;
|
||||
border-radius: 4px;
|
||||
top: 4px;
|
||||
right: 5px;
|
||||
line-height: 16px;
|
||||
}
|
||||
|
||||
.haerbin-01__systerm .el-dialog .el-dialog__headerbtn .el-icon-close:before {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.haerbin-01__systerm .el-dialog .el-dialog__headerbtn .el-dialog__close {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.haerbin-01__systerm .el-dialog .el-button {
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
padding: 0px;
|
||||
width: 80px;
|
||||
border: 2px outset #E2E2E2;
|
||||
border-radius: 0px !important;
|
||||
color: #000;
|
||||
background: #F0F0F0;
|
||||
}
|
||||
|
||||
.haerbin-01__systerm .el-dialog .el-button:focus span {
|
||||
border: 1px dashed gray;
|
||||
}
|
||||
|
||||
.haerbin-01__systerm .el-dialog .el-button:active {
|
||||
border: 2px inset #E2E2E2;
|
||||
}
|
||||
|
||||
.haerbin-01__systerm .el-dialog .el-button:disabled {
|
||||
border: 2px inset #E2E2E2;
|
||||
}
|
||||
|
||||
.haerbin-01__systerm .el-dialog .el-button:disabled span {
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
.haerbin-01__systerm .el-dialog .el-input {
|
||||
border: 2px inset #E9E9E9;
|
||||
}
|
||||
|
||||
.haerbin-01__systerm .el-dialog .el-input .el-input__inner {
|
||||
color: #000;
|
||||
background: #fff !important;
|
||||
border: 0px;
|
||||
border-radius: 0px !important;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.haerbin-01__systerm .el-dialog .el-input.is-disabled .el-input__inner {
|
||||
background: #F0F0F0 !important;
|
||||
}
|
||||
|
||||
.haerbin-01__systerm .el-dialog .el-textarea {
|
||||
border: 2px inset #E9E9E9;
|
||||
border-radius: 0px;
|
||||
}
|
||||
|
||||
.haerbin-01__systerm .el-dialog .el-textarea .el-textarea__inner {
|
||||
color: #000;
|
||||
background: #fff !important;
|
||||
border: 0px;
|
||||
border-radius: 0px !important;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.haerbin-01__systerm .el-dialog .el-textarea.is-disabled .el-textarea__inner {
|
||||
background: #F0F0F0 !important;
|
||||
}
|
||||
|
||||
.haerbin-01__systerm .el-dialog .el-table {
|
||||
border: 2px inset #E9E9E9;
|
||||
color: #000 !important;
|
||||
}
|
||||
|
||||
.haerbin-01__systerm .el-dialog .el-table .cell {
|
||||
line-height: unset !important;
|
||||
}
|
||||
|
||||
.haerbin-01__systerm .el-dialog .el-table th.is-leaf {
|
||||
background: #F0F0F0 !important;
|
||||
border-right: 1px solid #BDBDBD !important;
|
||||
border-bottom: 1px solid #BDBDBD !important;
|
||||
color: #000 !important;
|
||||
height: 20px !important;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.haerbin-01__systerm .el-dialog .el-table tr td {
|
||||
height: 20px !important;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.haerbin-01__systerm .el-dialog .el-table .el-table__empty-text {
|
||||
top: 15px !important;
|
||||
}
|
||||
|
||||
.haerbin-01__systerm .el-dialog .current-row>td {
|
||||
background: #3399FF !important;
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
.haerbin-01__systerm .el-dialog .el-checkbox__inner {
|
||||
border: 1px inset #dcdfe6 !important;
|
||||
}
|
||||
|
||||
.haerbin-01__systerm .el-dialog .el-checkbox__label {
|
||||
color: #000 !important;
|
||||
}
|
||||
|
||||
.haerbin-01__systerm .el-dialog .el-checkbox.is-disabled .el-checkbox__inner {
|
||||
background: #E6E6E6 !important;
|
||||
}
|
||||
|
||||
.haerbin-01__systerm .el-dialog .el-checkbox.is-disabled .el-checkbox__label {
|
||||
color: #C5C9CC !important;
|
||||
}
|
||||
|
||||
.haerbin-01__systerm .el-dialog .el-checkbox__input.is-checked .el-checkbox__inner {
|
||||
background: #fff !important;
|
||||
border: 1px inset #dcdfe6 !important;
|
||||
}
|
||||
|
||||
.haerbin-01__systerm .el-dialog .el-checkbox__input.is-checked .el-checkbox__inner::after {
|
||||
position: absolute;
|
||||
-webkit-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
content: "";
|
||||
border: 1px solid #000;
|
||||
border-left: 0;
|
||||
border-top: 0;
|
||||
height: 7px;
|
||||
left: 4px;
|
||||
top: 1px;
|
||||
}
|
||||
|
||||
.haerbin-01__systerm .el-dialog .el-radio__inner {
|
||||
border: 1px inset #dcdfe6 !important;
|
||||
}
|
||||
|
||||
.haerbin-01__systerm .el-dialog .el-radio__label {
|
||||
color: #000 !important;
|
||||
}
|
||||
|
||||
.haerbin-01__systerm .el-dialog .el-radio__input.is-checked .el-radio__inner {
|
||||
background: #fff !important;
|
||||
border: 1px inset #dcdfe6 !important;
|
||||
}
|
||||
|
||||
.haerbin-01__systerm .el-dialog .el-radio__input.is-checked .el-radio__inner::after {
|
||||
width: 4px;
|
||||
height: 4px;
|
||||
border-radius: 100%;
|
||||
background-color: #000 !important;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
}
|
||||
|
||||
.haerbin-01__systerm .el-dialog .el-radio.is-disabled .el-radio__inner {
|
||||
background: #E6E6E6 !important;
|
||||
}
|
||||
|
||||
.haerbin-01__systerm .el-dialog .el-radio.is-disabled .el-radio__label {
|
||||
color: #C5C9CC !important;
|
||||
}
|
||||
|
||||
.haerbin-01__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -15px;
|
||||
top: -18px;
|
||||
}
|
||||
|
||||
.haerbin-01__systerm .el-dialog .el-form-item label {
|
||||
font-weight: normal !important;
|
||||
color: #000 !important;
|
||||
}
|
||||
|
||||
.haerbin-01__systerm .el-dialog .context {
|
||||
height: 100px;
|
||||
border: 2px inset #E2E2E2;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.haerbin-01__systerm .el-dialog .table {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.haerbin-01__systerm .el-dialog .notice {
|
||||
margin-left: 62px;
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
.haerbin-01__systerm .el-dialog .button-group {
|
||||
margin-top: 10px;
|
||||
}
|
||||
.haerbin-01__systerm .nav-border .el-button {
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
padding: 0px;
|
||||
width: 80px;
|
||||
border: 1px solid #1F313F;
|
||||
font-size: 12px;
|
||||
border-radius: 5px !important;
|
||||
color: #000;
|
||||
background: #FFFFFF;
|
||||
}
|
||||
.haerbin-01__systerm .nav-border-other .el-button {
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
padding: 0px;
|
||||
width: 80px;
|
||||
border: 1px solid #1F313F;
|
||||
font-size: 12px;
|
||||
border-radius: 5px !important;
|
||||
}
|
||||
</style>
|
676
src/jmapNew/theme/nanjing_02/menus/menuBar.vue
Normal file
676
src/jmapNew/theme/nanjing_02/menus/menuBar.vue
Normal file
@ -0,0 +1,676 @@
|
||||
<template>
|
||||
<div id="menuBar" :style="{height: $store.state.training.prdType === '01'? '90px': '130px'}">
|
||||
<div class="haerbin-01__systerm nav">
|
||||
<el-row v-if="$store.state.training.prdType === '01'">
|
||||
<el-col :span="2">
|
||||
<div class="nav-border">
|
||||
<el-row>
|
||||
<el-button v-if="loginActive" style="width: 100px;line-height: 19px;" plain @click="login">{{ loginText }}</el-button>
|
||||
<div v-else class="loginClass" style="width: 100px;height:20px;text-align:center;border:1px #ccc solid">{{ loginText }}</div>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<input v-model="loginParam" :type="modelType" style="width: 100px;height:20px;" :disabled="loginActive" @keyup.enter="validateData">
|
||||
</el-row>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<div class="nav-border-other">
|
||||
<el-row>
|
||||
<template v-for="(item, index) in centralizedStationList1">
|
||||
<el-col :key="index" :span="colsNum">
|
||||
<div v-if="stationCode === item.code" class="fake-button-active" @click="switchShowStation(item.code)">{{ item.name }}</div>
|
||||
<div v-else class="fake-button" @click="switchShowStation(item.code)">{{ item.name }}</div>
|
||||
</el-col>
|
||||
</template>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<template v-for="(item, index) in centralizedStationList2">
|
||||
<el-col :key="index" :span="colsNum">
|
||||
<div v-if="stationCode === item.code" class="fake-button-active" @click="switchShowStation(item.code)">{{ item.name }}</div>
|
||||
<div v-else class="fake-button" @click="switchShowStation(item.code)">{{ item.name }}</div>
|
||||
</el-col>
|
||||
</template>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="10">
|
||||
<div class="nav-border">
|
||||
<el-row>
|
||||
<el-col :span="6"><el-button style="width: 80px;" :style="{background:isNoRecoverLevelA || isNoConfirmLevelA?'#F00':'#FFF' }" plain :class="{'headerBox' :isNoConfirmLevelA}" @click="showLowAlarm('A')">A级警报</el-button></el-col>
|
||||
<el-col :span="6"><el-button style="width: 80px;" :style="{background:isNoRecoverLevelB || isNoConfirmLevelB?'#F00':'#FFF' }" plain :class="{'headerBox' :isNoConfirmLevelB}" @click="showLowAlarm('B')">B级警报</el-button></el-col>
|
||||
<el-col :span="6"><el-button style="width: 80px;" :style="{background:isNoRecoverLevelC?'#F00':'#FFF' }" plain>C级警报</el-button></el-col>
|
||||
<el-col :span="6"><el-button style="width: 80px;" plain @click="undeveloped">记录</el-button></el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="6"><el-button style="width: 80px;" plain @click="controlAudio(false)">声音</el-button></el-col>
|
||||
<el-col :span="6"><el-button style="width: 80px;" plain @click="undeveloped">双屏</el-button></el-col>
|
||||
<el-col :span="6"><el-button style="width: 80px;" plain @click="undeveloped">TGI</el-button></el-col>
|
||||
<el-col :span="6"><el-button style="width: 80px;" plain @click="undeveloped">管理</el-button></el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<div class="nav-border">
|
||||
<el-row> </el-row>
|
||||
<el-row>
|
||||
<el-col :span="24"><div>{{ '版本:' + version }}</div></el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<div class="nav-border">
|
||||
<el-row> </el-row>
|
||||
<el-row> </el-row>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-else-if="$store.state.training.prdType === '02'" style="padding: 3px;">
|
||||
<el-col :span="16">
|
||||
<div style="width: calc(100% - 10px);border: 2px solid #DDD9CA;border-radius: 5px;">
|
||||
<el-row style="padding: 4px;">
|
||||
<div class="tip-content-box">
|
||||
<div v-if="tipContent[0]">{{ `${tipContent[0].level}` }}</div>
|
||||
<div v-if="tipContent[0]">{{ `${tipContent[0].time}` }}</div>
|
||||
<div v-if="tipContent[0]">{{ `${tipContent[0].confirm ? '确认': '未确认'}` }}</div>
|
||||
</div>
|
||||
<div class="tip-content-box">
|
||||
<div v-if="tipContent[1]">{{ `${tipContent[1].level}` }}</div>
|
||||
<div v-if="tipContent[1]">{{ `${tipContent[1].time}` }}</div>
|
||||
<div v-if="tipContent[1]">{{ `${tipContent[1].confirm ? '确认': '未确认'}` }}</div>
|
||||
</div>
|
||||
<div class="tip-content-box">
|
||||
<div v-if="tipContent[2]">{{ `${tipContent[2].level}` }}</div>
|
||||
<div v-if="tipContent[2]">{{ `${tipContent[2].time}` }}</div>
|
||||
<div v-if="tipContent[2]">{{ `${tipContent[2].confirm ? '确认': '未确认'}` }}</div>
|
||||
</div>
|
||||
</el-row>
|
||||
<el-row class="button-row">
|
||||
<div class="div-simulate-button" @click="undeveloped">系统</div>
|
||||
<div class="div-simulate-button" @click="undeveloped">联锁</div>
|
||||
<div class="div-simulate-button" @click="trainControlShow">列监</div>
|
||||
<div class="div-simulate-button" @click="undeveloped">站控</div>
|
||||
<div class="div-simulate-button" @click="undeveloped">车场</div>
|
||||
<div class="div-simulate-button" @click="undeveloped">编表</div>
|
||||
<div class="div-simulate-button" @click="undeveloped">车辆段</div>
|
||||
</el-row>
|
||||
<el-row class="button-row" style="margin-top: 10px;">
|
||||
<div class="div-simulate-button" @click="undeveloped">轨道</div>
|
||||
<div class="div-simulate-button" @click="undeveloped">调度</div>
|
||||
<div class="div-simulate-button" @click="undeveloped">录放</div>
|
||||
<div class="div-simulate-button" @click="undeveloped">管理</div>
|
||||
<div class="div-simulate-button" @click="undeveloped">列车信息</div>
|
||||
<div class="div-simulate-button" @click="undeveloped">职权</div>
|
||||
<div style="width: 80px;" />
|
||||
</el-row>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<div style="width: calc(100% - 10px);border: 2px solid #DDD9CA;border-radius: 5px;">
|
||||
<el-row style="height: 68px;display: flex; justify-content: space-between;align-items: center;">
|
||||
<div style="width: 40px;" class="div-simulate-button" :style="{background:isNoRecoverLevelA || isNoConfirmLevelA?'#F00':'#FFF' }" :class="{'headerBox' :isNoConfirmLevelA}" @click="showHimAlarm('A')">A</div>
|
||||
<div style="width: 40px;" class="div-simulate-button" :style="{background:isNoRecoverLevelB || isNoConfirmLevelB?'#F00':'#FFF' }" :class="{'headerBox' :isNoConfirmLevelB}" @click="showHimAlarm('B')">B</div>
|
||||
<div style="width: 40px;" class="div-simulate-button" :style="{background:isNoRecoverLevelC?'#F00':'#FFF' }" @click="showHimAlarm('C')">C</div>
|
||||
<img :src="voiceIcon" style="width: 40px;height: 40px;" @click="controlAudio(false)">
|
||||
</el-row>
|
||||
<el-row class="button-row">
|
||||
<div style="width: 80px;" class="div-simulate-button" @click="showHimAlarm">报警</div>
|
||||
<div style="width: 80px;" class="div-simulate-button" @click="undeveloped">运图</div>
|
||||
</el-row>
|
||||
<el-row class="button-row" style="margin-top: 10px;">
|
||||
<div style="width: 80px;" class="div-simulate-button" @click="undeveloped">报表</div>
|
||||
<div style="width: 80px;" class="div-simulate-button" @click="undeveloped">时刻表</div>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="4" style="border: 2px solid #DDD9CA;border-radius: 5px;">
|
||||
<el-row style="height: 68px;" />
|
||||
<el-row class="button-row">
|
||||
<div style="width: 80px;" class="div-simulate-button" @click="undeveloped">考评</div>
|
||||
<div style="width: 80px;" class="div-simulate-button" @click="showLogDetail">日志</div>
|
||||
</el-row>
|
||||
<el-row class="button-row" style="margin-top: 10px;">
|
||||
<div style="width: 80px;" class="div-simulate-button" @click="undeveloped">锁屏</div>
|
||||
<div style="width: 80px;" class="div-simulate-button" @click="undeveloped">退出</div>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<notice-info ref="noticeInfo" pop-class="haerbin-01__systerm" />
|
||||
<alarm-table-low ref="alarmTableLow" />
|
||||
<alarm-table-hmi ref="alarmTableHmi" />
|
||||
<train-control ref="trainControl" :offset="10" />
|
||||
<log-detail ref="logDetail" />
|
||||
<audio id="buzzer" controls loop="loop" style="width: 0;height: 0">
|
||||
<source :src="buzzerAudio" type="audio/mpeg">
|
||||
</audio>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
import voiceOpen from '@/assets/voiceOpen.png';
|
||||
import voiceClose from '@/assets/voiceClose.png';
|
||||
import BuzzerAudio from '@/assets/buzzer.mp3';
|
||||
import AlarmTableHmi from './menuDialog/alarmTableHmi';
|
||||
import AlarmTableLow from './menuDialog/alarmTableLow';
|
||||
import TrainControl from './dialog/trainControl';
|
||||
import LogDetail from './menuDialog/logDetail';
|
||||
|
||||
export default {
|
||||
name: 'MenuBar',
|
||||
components: {
|
||||
NoticeInfo,
|
||||
AlarmTableLow,
|
||||
AlarmTableHmi,
|
||||
TrainControl,
|
||||
LogDetail
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loginActive:true,
|
||||
loginText:'登录',
|
||||
modelType:'text',
|
||||
keydownTimes:0,
|
||||
loginParam:'',
|
||||
classA: -1,
|
||||
classB: -1,
|
||||
tempClassA: -1,
|
||||
tempClassB: -1,
|
||||
valid: true,
|
||||
stationCode: '',
|
||||
centralizedStationList1: [],
|
||||
centralizedStationList2: [],
|
||||
colsNum: 0,
|
||||
version: '',
|
||||
centralizedMap: {},
|
||||
tipContent: [],
|
||||
sound: false,
|
||||
buzzerAudio: BuzzerAudio,
|
||||
noConfirmMapA: {},
|
||||
noConfirmMapB: {},
|
||||
confirmNoRecoverMapA: {},
|
||||
confirmNoRecoverMapB: {},
|
||||
confirmNoRecoverMapC: {},
|
||||
noConfirmMapAString: '{}',
|
||||
noConfirmMapBString: '{}',
|
||||
confirmNoRecoverMapAString: '{}',
|
||||
confirmNoRecoverMapBString: '{}',
|
||||
confirmNoRecoverMapCString: '{}'
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'started',
|
||||
'steps',
|
||||
'order',
|
||||
'mode'
|
||||
]),
|
||||
...mapGetters('map', [
|
||||
'stationList'
|
||||
]),
|
||||
userId() {
|
||||
return this.$store.state.user ? this.$store.state.user.id : '';
|
||||
},
|
||||
voiceIcon() {
|
||||
return this.sound ? voiceOpen : voiceClose;
|
||||
},
|
||||
isNoConfirmLevelA() {
|
||||
return this.noConfirmMapAString !== '{}';
|
||||
},
|
||||
isNoConfirmLevelB() {
|
||||
return this.noConfirmMapBString !== '{}';
|
||||
},
|
||||
isNoRecoverLevelA() {
|
||||
return this.confirmNoRecoverMapAString !== '{}';
|
||||
},
|
||||
isNoRecoverLevelB() {
|
||||
return this.confirmNoRecoverMapBString !== '{}';
|
||||
},
|
||||
isNoRecoverLevelC() {
|
||||
return this.confirmNoRecoverMapCString !== '{}';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
tempClassA() {
|
||||
this.classA = this.$store.state.menuOperation.break ? -1 : this.tempClassA;
|
||||
},
|
||||
tempClassB() {
|
||||
this.classB = this.$store.state.menuOperation.break ? -1 : this.tempClassB;
|
||||
},
|
||||
'$store.state.menuOperation.break': function (val) {
|
||||
if (val) {
|
||||
this.classA = this.classB = -1;
|
||||
} else {
|
||||
this.classA = this.tempClassA;
|
||||
this.classB = this.tempClassB;
|
||||
}
|
||||
},
|
||||
'$store.state.training.prdType': function (val) {
|
||||
if (val == '01' && this.centralizedStationList1.length) {
|
||||
this.$store.dispatch('map/setShowCentralizedStationCode', this.centralizedStationList1[0].code);
|
||||
} else {
|
||||
this.$store.dispatch('map/setShowCentralizedStationCode', '');
|
||||
}
|
||||
},
|
||||
'$store.state.training.centerStationCode': function(code) {
|
||||
if (code) {
|
||||
this.stationCode = code;
|
||||
}
|
||||
},
|
||||
'$store.state.socket.simulationRoleList':function(list) {
|
||||
if (list && list.length) {
|
||||
this.checkRoleChange(list);
|
||||
}
|
||||
},
|
||||
'$store.state.socket.simulationAlarmInfo': function(val) {
|
||||
(val || []).forEach(item => {
|
||||
if (!item.confirmed) {
|
||||
this.tipContent.push(item);
|
||||
this.handleAlarm(item);
|
||||
if (this.tipContent.length > 3) {
|
||||
this.tipContent.shift();
|
||||
}
|
||||
if (item.level === 'A') {
|
||||
this.noConfirmMapA[item.code] = item;
|
||||
this.noConfirmMapAString = JSON.stringify(this.noConfirmMapA);
|
||||
} else if (item.level === 'B') {
|
||||
this.noConfirmMapB[item.code] = item;
|
||||
this.noConfirmMapBString = JSON.stringify(this.noConfirmMapB);
|
||||
}
|
||||
} else if (!item.recovered) {
|
||||
if (item.level === 'A') {
|
||||
delete this.noConfirmMapA[item.code];
|
||||
this.confirmNoRecoverMapA[item.code] = item;
|
||||
this.noConfirmMapAString = JSON.stringify(this.noConfirmMapA);
|
||||
this.confirmNoRecoverMapAString = JSON.stringify(this.confirmNoRecoverMapA);
|
||||
} else if (item.level === 'B') {
|
||||
delete this.noConfirmMapB[item.code];
|
||||
this.confirmNoRecoverMapB[item.code] = item;
|
||||
this.noConfirmMapBString = JSON.stringify(this.noConfirmMapB);
|
||||
this.confirmNoRecoverMapBString = JSON.stringify(this.confirmNoRecoverMapB);
|
||||
} else if (item.level === 'C') {
|
||||
this.confirmNoRecoverMapC[item.code] = item;
|
||||
this.confirmNoRecoverMapCString = JSON.stringify(this.confirmNoRecoverMapC);
|
||||
}
|
||||
} else {
|
||||
if (item.level === 'A') {
|
||||
delete this.noConfirmMapA[item.code];
|
||||
delete this.confirmNoRecoverMapA[item.code];
|
||||
this.noConfirmMapAString = JSON.stringify(this.noConfirmMapA);
|
||||
this.confirmNoRecoverMapAString = JSON.stringify(this.confirmNoRecoverMapA);
|
||||
} else if (item.level === 'B') {
|
||||
delete this.noConfirmMapB[item.code];
|
||||
delete this.confirmNoRecoverMapB[item.code];
|
||||
this.noConfirmMapBString = JSON.stringify(this.noConfirmMapB);
|
||||
this.confirmNoRecoverMapBString = JSON.stringify(this.confirmNoRecoverMapB);
|
||||
} else if (item.level === 'C') {
|
||||
delete this.confirmNoRecoverMapC[item.code];
|
||||
this.confirmNoRecoverMapCString = JSON.stringify(this.confirmNoRecoverMapC);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.version = this.$store.state.map.version;
|
||||
this.initMenu();
|
||||
/* 由于修改角色现行是先取消人员仿真角色后赋予,故menuBar会在仿真角色取消时销毁,在赋予特定角色是挂载,故此处处理 */
|
||||
if (this.$store.state.socket.simulationRoleList && this.$store.state.socket.simulationRoleList.length) {
|
||||
this.checkRoleChange(this.$store.state.socket.simulationRoleList);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleAlarm(val) {
|
||||
if (val.level === 'A' || val.level === 'B') {
|
||||
this.controlAudio(true);
|
||||
}
|
||||
},
|
||||
initMenu() {
|
||||
// 设置中心点 设置对应的集中站显示
|
||||
const centralizedStationList = [];
|
||||
this.centralizedStationList1 = [];
|
||||
this.centralizedStationList2 = [];
|
||||
this.stationList.forEach(item => {
|
||||
if (item.centralized) {
|
||||
centralizedStationList.push(item);
|
||||
this.centralizedMap[item.code] = item.code;
|
||||
item.chargeStationCodeList && item.chargeStationCodeList.length && item.chargeStationCodeList.forEach(ele => {
|
||||
this.centralizedMap[ele] = item.code;
|
||||
});
|
||||
}
|
||||
});
|
||||
centralizedStationList.forEach((item, index) => {
|
||||
if (index < centralizedStationList.length / 2) {
|
||||
this.centralizedStationList1.push(item);
|
||||
} else {
|
||||
this.centralizedStationList2.push(item);
|
||||
}
|
||||
});
|
||||
this.colsNum = 24 / this.centralizedStationList1.length;
|
||||
if (centralizedStationList.length) {
|
||||
if (this.$store.state.training.centerStationCode) {
|
||||
this.stationCode = this.$store.state.training.centerStationCode;
|
||||
} else {
|
||||
this.stationCode = centralizedStationList[0].code;
|
||||
}
|
||||
}
|
||||
|
||||
if (this.$store.state.training.prdType == '01') {
|
||||
this.$store.dispatch('map/setShowCentralizedStationCode', this.stationCode);
|
||||
}
|
||||
},
|
||||
switchShowStation(stationCode) {
|
||||
this.stationCode = stationCode;
|
||||
this.$store.dispatch('map/setShowCentralizedStationNum');
|
||||
this.$store.dispatch('map/setShowCentralizedStationCode', stationCode);
|
||||
},
|
||||
undeveloped() {
|
||||
this.doClose();
|
||||
this.$alert(this.$t('menu.menuBar.implemented'), this.$t('global.tips'), {
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
callback: action => {
|
||||
}
|
||||
});
|
||||
},
|
||||
showLogDetail() {
|
||||
this.$refs.logDetail.doShow();
|
||||
},
|
||||
login() {
|
||||
if (this.loginActive) {
|
||||
if (this.loginText === '退出') {
|
||||
this.loginText = '登录';
|
||||
} else {
|
||||
this.loginText = '用户';
|
||||
this.loginActive = false;
|
||||
}
|
||||
}
|
||||
},
|
||||
validateData() {
|
||||
if (this.keydownTimes === 0 && this.loginParam == 'admin') {
|
||||
this.loginText = '密码';
|
||||
this.modelType = 'password';
|
||||
this.keydownTimes++;
|
||||
this.loginParam = '';
|
||||
} else if (this.keydownTimes === 1 && this.loginParam == '123456') {
|
||||
this.loginText = '退出';
|
||||
this.keydownTimes = 0;
|
||||
this.loginParam = '';
|
||||
this.modelType = 'text';
|
||||
this.loginActive = true;
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
this.$nextTick(() => {
|
||||
EventBus.$emit('closeMenu');
|
||||
});
|
||||
},
|
||||
checkRoleChange(list) {
|
||||
list.forEach(item => {
|
||||
if (item.messageType === 'PLAY_CHANGE' && item.userId == this.userId && item.type === 'STATION_SUPERVISOR') {
|
||||
this.switchShowStation(this.centralizedMap[item.deviceCode]);
|
||||
}
|
||||
});
|
||||
},
|
||||
showHimAlarm(level) {
|
||||
this.$refs.alarmTableHmi.doShow(level);
|
||||
},
|
||||
showLowAlarm(level) {
|
||||
this.$refs.alarmTableLow.doShow(level);
|
||||
},
|
||||
trainControlShow() {
|
||||
this.$refs.trainControl.doShow();
|
||||
},
|
||||
controlAudio(val) {
|
||||
const audio = document.getElementById('buzzer');
|
||||
this.sound = val;
|
||||
if (audio !== null) {
|
||||
if (val) {
|
||||
audio.play();
|
||||
} else if (val === false) {
|
||||
audio.pause();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped rel="stylesheet/scss" lang="scss">
|
||||
@import "src/styles/mixin.scss";
|
||||
$width: 30px;
|
||||
$height: 90px;
|
||||
$menuPadding: 10px;
|
||||
$menuItemHeight: 30px;
|
||||
$menuItemWidth: 190px;
|
||||
$menuItemPadding: 5px;
|
||||
|
||||
#menuBar {
|
||||
z-index: 37;
|
||||
position: absolute;
|
||||
width: inherit;
|
||||
}
|
||||
.nav-border {
|
||||
font-size: 12px;
|
||||
color: #000;
|
||||
text-align: center;
|
||||
line-height: 45px;
|
||||
border-top: 2px solid #7E8076;
|
||||
border-left: 2px solid #6A6B64;
|
||||
border-right: 2px solid #FBFBFA;
|
||||
border-bottom: 2px solid #FBFBFA;
|
||||
}
|
||||
.nav-border-other {
|
||||
font-size: 12px;
|
||||
color: #000;
|
||||
text-align: center;
|
||||
border-top: 2px solid #7E8076;
|
||||
border-left: 2px solid #6A6B64;
|
||||
border-right: 2px solid #FBFBFA;
|
||||
border-bottom: 2px solid #FBFBFA;
|
||||
}
|
||||
.nav {
|
||||
display: block;
|
||||
cursor: pointer;
|
||||
color: #0000;
|
||||
background: -webkit-linear-gradient(#FDFDFE, #DEE3F3);
|
||||
background: -o-linear-gradient(#FDFDFE, #DEE3F3);
|
||||
background: -moz-linear-gradient(#FDFDFE, #DEE3F3);
|
||||
background: linear-gradient(#FDFDFE, #DEE3F3);
|
||||
/*background: #FFFFFF;*/
|
||||
border: 1px solid #B6BCCC !important;
|
||||
border-bottom: 2px solid #B6BCCC !important;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.nav-li {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
padding-left: $menuPadding;
|
||||
padding-right: $menuPadding;
|
||||
}
|
||||
|
||||
.nav-li:active {
|
||||
background: #C9D0E1;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.nav-li-text {
|
||||
font-size: 13px;
|
||||
color: #000;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.nav-ul {
|
||||
display: none;
|
||||
position: absolute;
|
||||
list-style: none;
|
||||
border: 1px solid gray !important;
|
||||
line-height: $menuItemHeight;
|
||||
width: $menuItemWidth;
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
.menu-ul {
|
||||
display: none;
|
||||
list-style: none;
|
||||
background: #F0F0F0;
|
||||
line-height: $menuItemHeight;
|
||||
width: $menuItemWidth;
|
||||
bottom: $menuItemHeight;
|
||||
}
|
||||
|
||||
.active {
|
||||
position: absolute;
|
||||
display: block !important;
|
||||
}
|
||||
|
||||
.menu-ul-text {
|
||||
font-size: 14px;
|
||||
color: #000;
|
||||
letter-spacing: 0;
|
||||
height: $menuItemHeight;
|
||||
line-height: $menuItemHeight;
|
||||
}
|
||||
|
||||
.menu-li {
|
||||
text-align: left;
|
||||
background: #F0F0F0;
|
||||
height: $menuItemHeight;
|
||||
line-height: $menuItemHeight;
|
||||
}
|
||||
|
||||
.menu-li-block {
|
||||
display: flex;
|
||||
letter-spacing: 0;
|
||||
height: $menuItemHeight;
|
||||
line-height: $menuItemHeight;
|
||||
}
|
||||
|
||||
.menu-li-text {
|
||||
font-size: 14px;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.menu-li-text .status {
|
||||
display: block;
|
||||
float: left;
|
||||
border-right: 1px inset #CACACA;
|
||||
width: $width;
|
||||
}
|
||||
|
||||
.menu-li-text .label {
|
||||
display: block;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.menu-li-block:hover {
|
||||
background: #C9DEF7;
|
||||
box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
}
|
||||
.fake-button{
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
padding: 0px;
|
||||
width: 80px;
|
||||
border: 1px solid #1F313F;
|
||||
font-size: 12px;
|
||||
border-radius: 5px !important;
|
||||
color: #000;
|
||||
background: #FFFFFF;
|
||||
margin: 5px auto;
|
||||
}
|
||||
.fake-button-active{
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
padding: 0px;
|
||||
width: 80px;
|
||||
border: 1px solid #1F313F;
|
||||
font-size: 12px;
|
||||
border-radius: 5px !important;
|
||||
color: #70B6FF;
|
||||
background: #ECF5FF;
|
||||
margin: 5px auto;
|
||||
}
|
||||
|
||||
.loginClass{
|
||||
width: 100px;
|
||||
height: 20px;
|
||||
text-align: center;
|
||||
border: 1px solid rgb(204, 204, 204);
|
||||
line-height: 20px;
|
||||
margin: 5px auto;
|
||||
border-radius: 5px;
|
||||
background: #ffffff;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
.div-simulate-button{
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
display: inline-block;
|
||||
font-size: 14px;
|
||||
color: #303030;
|
||||
border: 1px solid #44556D;
|
||||
background: #FFF;
|
||||
text-align: center;
|
||||
border-radius: 5px;
|
||||
width: 80px;
|
||||
}
|
||||
.tip-content-box{
|
||||
height: 20px;
|
||||
width: 100%;
|
||||
line-height: 20px;
|
||||
background: #001528;
|
||||
color: #C20F29;
|
||||
font-size: 14px;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
}
|
||||
.button-row{
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
display: flex;
|
||||
justify-content:space-between;
|
||||
}
|
||||
@keyframes fade {
|
||||
from {
|
||||
opacity: 1.0;
|
||||
}
|
||||
50% {
|
||||
opacity: 0.4;
|
||||
}
|
||||
to {
|
||||
opacity: 1.0;
|
||||
}
|
||||
}
|
||||
|
||||
@-webkit-keyframes fade {
|
||||
from {
|
||||
opacity: 1.0;
|
||||
}
|
||||
50% {
|
||||
opacity: 0.4;
|
||||
}
|
||||
to {
|
||||
opacity: 1.0;
|
||||
}
|
||||
}
|
||||
.headerBox {
|
||||
background: #f00;
|
||||
animation: fade 600ms infinite;
|
||||
-webkit-animation: fade 600ms infinite;
|
||||
}
|
||||
</style>
|
1104
src/jmapNew/theme/nanjing_02/menus/menuButton.vue
Normal file
1104
src/jmapNew/theme/nanjing_02/menus/menuButton.vue
Normal file
File diff suppressed because it is too large
Load Diff
155
src/jmapNew/theme/nanjing_02/menus/menuDialog/alarmTableHmi.vue
Normal file
155
src/jmapNew/theme/nanjing_02/menus/menuDialog/alarmTableHmi.vue
Normal file
@ -0,0 +1,155 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag class="haerbin-01__systerm manage-user" title="报警列表" :before-close="handleClose" :visible.sync="show" width="70%" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||
<div style="text-align: center;">
|
||||
<div style="text-align: left;width: 90%;margin-left: 5%;border: 1px solid #808080;border-radius: 5px;padding: 10px;">
|
||||
<el-row>
|
||||
<el-col :span="10" style="text-align: center;">
|
||||
<div style="display: inline-block;margin-right: 5px;">开始时间:</div>
|
||||
<el-date-picker
|
||||
v-model="startTime"
|
||||
size="small"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="选择日期时间"
|
||||
/>
|
||||
</el-col>
|
||||
<el-col :span="10" style="text-align: center;">
|
||||
<div style="display: inline-block;margin-right: 5px;margin-left: 10px;">结束时间:</div>
|
||||
<el-date-picker
|
||||
v-model="endTime"
|
||||
size="small"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="选择日期时间"
|
||||
/>
|
||||
</el-col>
|
||||
<el-col :span="4" style="text-align: center;">
|
||||
<el-button style="margin-left: 10px;" @click="queryData(true)">查询</el-button>
|
||||
<el-button style="margin-left: 10px;" @click="queryData(false)">撤销查询</el-button>
|
||||
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div style="position: relative;height: 20px;line-height: 20px;top: -63px;text-align: left;right: -80px;background: #F0F0F0;width: 88px;">筛选条件查询</div>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-button @click="infoConfirm">消息确认</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-button :disabled="true">消息打印</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-button :disabled="true">删除备注</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-table
|
||||
:data="totalData"
|
||||
style="width: 100%;margin-top: 10px;"
|
||||
height="450"
|
||||
>
|
||||
<el-table-column prop="operate" label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-checkbox v-model="checkList[scope.$index]" @change="operateChange(scope)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="level" label="报警级别" />
|
||||
<el-table-column prop="time" label="日期/时间" width="150px" />
|
||||
<el-table-column prop="code" label="报警序号" />
|
||||
<el-table-column prop="deviceCode" label="设备编号">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ handleDeviceName(scope.row.deviceCode) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="address" label="信号编号" />
|
||||
<el-table-column prop="address" label="元素编号" />
|
||||
<el-table-column prop="confirmed" label="确认">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.confirmed? 'Y':'N' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="confirmedUserName" label="确认人编号" width="120px" />
|
||||
<el-table-column prop="confirmTime" label="确认时间" width="150px" />
|
||||
<el-table-column prop="recoverTime" label="恢复">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.recovered? 'Y':'N' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="address" label="恢复时间" />
|
||||
<el-table-column prop="address" label="备注信息" width="200px" />
|
||||
</el-table>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getAlarmList, confirmAlarm} from '@/api/simulation';
|
||||
export default {
|
||||
name: 'AlarmHmi',
|
||||
data() {
|
||||
return {
|
||||
currentPage: 1,
|
||||
show: false,
|
||||
level: '',
|
||||
startTime: '',
|
||||
endTime: '',
|
||||
deviceCode: '',
|
||||
elementCode: '',
|
||||
totalData: [],
|
||||
checkList: []
|
||||
};
|
||||
},
|
||||
computed:{
|
||||
},
|
||||
methods:{
|
||||
doShow(level) {
|
||||
this.show = true;
|
||||
this.level = level;
|
||||
this.queryData(false);
|
||||
},
|
||||
handleClose() {
|
||||
this.level = '';
|
||||
this.startTime = '';
|
||||
this.endTime = '';
|
||||
this.show = false;
|
||||
},
|
||||
operateChange(row) {
|
||||
},
|
||||
queryData(flag) {
|
||||
if (!flag) {
|
||||
this.endTime = '';
|
||||
this.startTime = '';
|
||||
this.deviceCode = '';
|
||||
this.elementCode = '';
|
||||
}
|
||||
const params = { level: this.level, startTime: this.startTime, endTime:this.endTime };
|
||||
getAlarmList(this.$route.query.group, params).then(resp => {
|
||||
this.totalData = resp.data;
|
||||
});
|
||||
},
|
||||
infoConfirm() {
|
||||
const codes = [];
|
||||
this.checkList.forEach((check, index) => {
|
||||
if (check) {
|
||||
codes.push(this.totalData[index].code);
|
||||
}
|
||||
});
|
||||
confirmAlarm(this.$route.query.group, codes).then(resp => {
|
||||
this.queryData(true);
|
||||
}).catch(() => {
|
||||
this.$message.error('确认消息失败!');
|
||||
});
|
||||
},
|
||||
handleDeviceName(code) {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](code);
|
||||
return device.name;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/deep/ .el-dialog .el-input {
|
||||
border: 0 !important;
|
||||
}
|
||||
|
||||
</style>
|
125
src/jmapNew/theme/nanjing_02/menus/menuDialog/alarmTableLow.vue
Normal file
125
src/jmapNew/theme/nanjing_02/menus/menuDialog/alarmTableLow.vue
Normal file
@ -0,0 +1,125 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag class="haerbin-01__systerm manage-user" title="报警列表" :before-close="handleClose" :visible.sync="show" width="70%" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||
<div style="text-align: center;">
|
||||
<div style="text-align: left;">
|
||||
<div style="display: inline-block;margin-right: 5px;">开始时间:</div>
|
||||
<el-date-picker
|
||||
v-model="startTime"
|
||||
size="small"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="选择日期时间"
|
||||
/>
|
||||
<div style="display: inline-block;margin-right: 5px;margin-left: 10px;">结束时间:</div>
|
||||
<el-date-picker
|
||||
v-model="endTime"
|
||||
size="small"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="选择日期时间"
|
||||
/>
|
||||
<el-button style="margin-left: 10px;" @click="queryData">查询</el-button>
|
||||
</div>
|
||||
<el-table
|
||||
:data="totalData"
|
||||
style="width: 100%;margin-top: 10px;"
|
||||
height="600"
|
||||
>
|
||||
<el-table-column prop="time" label="日期/时间" width="150px" />
|
||||
<el-table-column prop="level" label="等级" />
|
||||
<el-table-column prop="deviceCode" label="设备类型">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ handleDeviceType(scope.row.deviceCode) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="deviceCode" label="设备编号">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ handleDeviceName(scope.row.deviceCode) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="code" label="故障号" />
|
||||
<el-table-column prop="description" label="故障描述" />
|
||||
<el-table-column prop="recover" label="已恢复">
|
||||
<template slot-scope="scope">
|
||||
<el-checkbox v-model="scope.row.recovered" :disabled="true" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="address" label="恢复时间" />
|
||||
<el-table-column prop="confirm" label="已确认">
|
||||
<template slot-scope="scope">
|
||||
<el-checkbox v-model="scope.row.confirmed" :disabled="isJointTraining || scope.row.confirmed" @change="changeConfirm(scope.row)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="confirmedUserName" label="确认人" />
|
||||
<el-table-column prop="confirmTime" label="确认时间" width="150px" />
|
||||
<el-table-column prop="address" label="备注信息" width="200px" />
|
||||
</el-table>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getAlarmList} from '@/api/simulation';
|
||||
import {deviceType} from '@/scripts/cmdPlugin/Config';
|
||||
import {confirmAlarm} from '@/api/simulation';
|
||||
export default {
|
||||
name: 'AlarmLow',
|
||||
data() {
|
||||
return {
|
||||
currentPage: 1,
|
||||
show: false,
|
||||
level: '',
|
||||
startTime: '',
|
||||
endTime: '',
|
||||
totalData: [],
|
||||
tableData: []
|
||||
};
|
||||
},
|
||||
computed:{
|
||||
isJointTraining() {
|
||||
return this.$route.path.includes('jointTraining');
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
doShow(level) {
|
||||
this.show = true;
|
||||
this.level = level;
|
||||
this.queryData();
|
||||
},
|
||||
changeConfirm(row) {
|
||||
confirmAlarm(this.$route.query.group, [row.code]).then(resp => {
|
||||
this.queryData();
|
||||
}).catch(() => {
|
||||
this.$message.error('确认消息失败!');
|
||||
});
|
||||
},
|
||||
handleClose() {
|
||||
this.level = '';
|
||||
this.startTime = '';
|
||||
this.endTime = '';
|
||||
this.show = false;
|
||||
},
|
||||
queryData() {
|
||||
const params = { level: this.level, startTime: this.startTime, endTime:this.endTime };
|
||||
getAlarmList(this.$route.query.group, params).then(resp => {
|
||||
this.totalData = resp.data;
|
||||
});
|
||||
},
|
||||
handleDeviceType(code) {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](code);
|
||||
return deviceType[device.type];
|
||||
},
|
||||
handleDeviceName(code) {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](code);
|
||||
return device.name;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/deep/ .el-dialog .el-input {
|
||||
border: 0 !important;
|
||||
}
|
||||
|
||||
</style>
|
61
src/jmapNew/theme/nanjing_02/menus/menuDialog/commandEnum.js
Normal file
61
src/jmapNew/theme/nanjing_02/menus/menuDialog/commandEnum.js
Normal file
@ -0,0 +1,61 @@
|
||||
export default {
|
||||
Signal_Set_Route:{name:'ATP进路', code:'routeCode' },
|
||||
Signal_Cancel_Route:{name:'取消ATP', code:'signalCode' },
|
||||
// Signal_Set_Route:{name:'联锁进路',},
|
||||
// Signal_Cancel_Route:{name:'取消联锁',},
|
||||
Signal_Set_Guide:{name:'引导进路', code:'routeCode' },
|
||||
Signal_Cancel_Guide:{name:'取消引导', code:'signalCode' },
|
||||
|
||||
// 道岔操作
|
||||
Switch_Block:{name:'封锁道岔', code:'switchCode' },
|
||||
Switch_Unblock:{name:'解封道岔', code:'switchCode' },
|
||||
Switch_Single_Unlock:{name:'取消锁定', code:'switchCode' },
|
||||
Switch_Single_Lock:{name:'单锁道岔', code:'switchCode' },
|
||||
Switch_Normal_Position:{name:'转换定位', code:'switchCode' },
|
||||
Switch_Reverse_Position:{name:'转换反位', code:'switchCode' },
|
||||
Switch_Section_Block:{name:'封锁区段', code:'switchCode' },
|
||||
Switch_Section_Unblock:{name:'解封区段', code:'switchCode' },
|
||||
Switch_Cancel_Limit_Speed:{name:'轨区消限', code:'switchCode' },
|
||||
Switch_Set_Limit_Speed:{name:'轨区设限', code:'switchCode', params:[{code:'speedLimitValue', name:'限速值为:'}]},
|
||||
Switch_Fault_Unlock:{name:'强解区段', code:'switchCode' },
|
||||
|
||||
// 信号机操作
|
||||
Signal_Set_CI_Auto_Trigger:{name:'追踪单开', code:'signalCode' },
|
||||
Signal_Cancel_CI_Auto_Trigger:{name:'追踪单关', code:'signalCode' },
|
||||
Signal_Open_Auto_Setting:{name:'自排单开', code:'signalCode' },
|
||||
Signal_Close_Auto_Setting:{name:'自排单关', code:'signalCode' },
|
||||
Signal_Block:{name:'封锁信号', code:'signalCode' },
|
||||
Signal_Reopen_Signal:{name:'重复开放', code:'signalCode' },
|
||||
Signal_Unblock:{name:'解封信号', code:'signalCode' },
|
||||
Signal_Close_Signal:{name:'关单信号', code:'signalCode' },
|
||||
|
||||
// 站台操作
|
||||
Stand_Set_Hold_Train:{name:'扣车', code:'standCode' },
|
||||
Stand_Cancel_Hold_Train:{name:'取消扣车', code:'standCode' },
|
||||
Stand_Set_Jump_Stop:{name:'越站', code:'standCode' },
|
||||
Stand_Cancel_Jump_Stop:{name:'取消越站', code:'standCode' },
|
||||
|
||||
// 方向杆
|
||||
Direction_Change:{name:'切换右向', code:'code' },
|
||||
// Direction_Change:{name:'切换右向', code:'signalCode' }
|
||||
|
||||
// 区段操作
|
||||
Section_Block:{name:'封锁区段', code:'sectionCode' },
|
||||
Section_Unblock:{name:'解封区段', code:'sectionCode' },
|
||||
Section_Cancel_Limit_Speed:{name:'轨区消限', code:'sectionCode' },
|
||||
Section_Set_Limit_Speed:{name:'轨区设限', code:'sectionCode', params:[{code:'speedLimitValue', name:'限速值为:'}] },
|
||||
Section_Fault_Unlock:{name:'强解区段', code:'sectionCode' },
|
||||
|
||||
// 车站操作
|
||||
Station_Set_CI_Auto_Trigger:{name:'追踪全开', code:'stationCode' },
|
||||
Station_Cancel_CI_Auto_Trigger:{name:'追踪全关', code:'stationCode' },
|
||||
Station_CIArea_Close_AllSignal :{name:'关区信号', code:'stationCode' },
|
||||
Station_Open_Auto_Setting:{name:'自排全开', code:'stationCode' },
|
||||
Station_Close_Auto_Setting :{name:'自排全关', code:'stationCode' },
|
||||
Station_Close_AllSignal:{name:'关站信号', code:'stationCode' },
|
||||
|
||||
// 联锁区操作
|
||||
CM_Receive_Control:{name:'接收控制', code:'stationCode' },
|
||||
CM_Surrender_Control :{name:'交出控制', code:'stationCode' }
|
||||
|
||||
};
|
190
src/jmapNew/theme/nanjing_02/menus/menuDialog/logDetail.vue
Normal file
190
src/jmapNew/theme/nanjing_02/menus/menuDialog/logDetail.vue
Normal file
@ -0,0 +1,190 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag class="haerbin-01__systerm manage-user" title="操作列表" :before-close="handleClose" :visible.sync="show" width="70%" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||
<div style="text-align: center;">
|
||||
<div style="text-align: left;">
|
||||
<div style="display: inline-block;margin-right: 5px;">开始时间:</div>
|
||||
<el-date-picker
|
||||
v-model="startTime"
|
||||
size="small"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="选择日期时间"
|
||||
/>
|
||||
<div style="display: inline-block;margin-right: 5px;margin-left: 10px;">结束时间:</div>
|
||||
<el-date-picker
|
||||
v-model="endTime"
|
||||
size="small"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="选择日期时间"
|
||||
/>
|
||||
<el-button style="margin-left: 10px;" :loading="loading" @click="queryData">查询</el-button>
|
||||
</div>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="totalData"
|
||||
border
|
||||
style="width: 100%"
|
||||
height="520"
|
||||
>
|
||||
<el-table-column prop="time" label="日期/时间" header-align="center" align="center" width="200px" />
|
||||
<el-table-column prop="operateName" label="操作人" header-align="center" align="center" width="100px" />
|
||||
<el-table-column prop="terminal" label="终端" header-align="center" align="center" width="200px" />
|
||||
<el-table-column prop="operateDes" label="操作" header-align="center" align="center" />
|
||||
</el-table>
|
||||
<el-pagination
|
||||
:current-page="pageIndex"
|
||||
:page-size="pageSize"
|
||||
layout="total, prev, pager, next, jumper"
|
||||
:total="totalNum"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="changePage"
|
||||
/>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {deviceType} from '@/scripts/cmdPlugin/Config';
|
||||
import {getLogList} from '@/api/simulation';
|
||||
import command from './commandEnum';
|
||||
import { mapGetters } from 'vuex';
|
||||
export default {
|
||||
name: 'LogDetail',
|
||||
data() {
|
||||
return {
|
||||
pageIndex: 1,
|
||||
show: false,
|
||||
startTime: '',
|
||||
endTime: '',
|
||||
loading:false,
|
||||
totalData: [],
|
||||
pageSize: 10,
|
||||
totalNum:0,
|
||||
beCentralizedStationMap:{}
|
||||
};
|
||||
},
|
||||
computed:{
|
||||
...mapGetters('map', [
|
||||
'stationList'
|
||||
])
|
||||
},
|
||||
mounted() {
|
||||
this.stationList.forEach(data=>{
|
||||
if (data.centralized) {
|
||||
this.beCentralizedStationMap[data.code] = data.code;
|
||||
data.chargeStationCodeList.forEach(each=>{
|
||||
this.beCentralizedStationMap[each] = data.code;
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
methods:{
|
||||
doShow() {
|
||||
this.show = true;
|
||||
this.queryData();
|
||||
},
|
||||
handleClose() {
|
||||
this.startTime = '';
|
||||
this.endTime = '';
|
||||
this.show = false;
|
||||
},
|
||||
queryData() {
|
||||
const params = { startTime: this.startTime, endTime:this.endTime, pageSize:this.pageSize, pageNum:this.pageIndex };
|
||||
this.loading = true;
|
||||
getLogList(this.$route.query.group, params).then(resp => {
|
||||
this.loading = false;
|
||||
const totalData = [];
|
||||
this.totalData = [];
|
||||
resp.data.list.forEach(element => {
|
||||
const eachData = {
|
||||
time:element.time,
|
||||
operateName:element.member.userId,
|
||||
terminal:this.getTerminal(element.member.id),
|
||||
operateDes:this.getOperateDetail(element.event)
|
||||
};
|
||||
totalData.push(eachData);
|
||||
});
|
||||
this.totalNum = resp.data.total;
|
||||
this.pageIndex = resp.data.pageNum;
|
||||
this.pageSize = resp.data.pageSize;
|
||||
this.totalData = totalData;
|
||||
}).catch(error=>{
|
||||
this.loading = false;
|
||||
console.log(error);
|
||||
});
|
||||
},
|
||||
getTerminal(id) {
|
||||
const member = this.$store.state.training.memberData[id];
|
||||
return member ? member.labelName : '';
|
||||
},
|
||||
getOperateDetail(event) {
|
||||
switch (event.type) {
|
||||
case 'LOGIN': {
|
||||
return '用户登陆成功';
|
||||
}
|
||||
case 'LOGOUT': {
|
||||
return '用户退出登陆';
|
||||
}
|
||||
case 'OPERATE': {
|
||||
let result = '';
|
||||
const deviceType = command[event.operation].code;
|
||||
const deviceCode = event.operationParamMap[deviceType];
|
||||
if (deviceType == 'routeCode') {
|
||||
const device = this.$store.getters['map/routeList'].find(route=>{ return route.code == deviceCode; });
|
||||
result += '对元素 “' + device.name + '”';
|
||||
} else {
|
||||
if (deviceCode) {
|
||||
if (event.operation == 'CM_Surrender_Control' || event.operation == 'CM_Receive_Control' || event.operation == 'Station_Close_AllSignal') {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](this.beCentralizedStationMap[deviceCode]);
|
||||
result += '对联锁区 “' + device.name + '联锁区”';
|
||||
} else {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](deviceCode);
|
||||
if (device) {
|
||||
if (event.operation == 'Station_Set_CI_Auto_Trigger' || event.operation == 'Station_Cancel_CI_Auto_Trigger') {
|
||||
result += '对联锁区 “' + device.name + '联锁区”';
|
||||
} else {
|
||||
result += '对元素 “' + device.name + '”';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
result += ' 执行命令 “' + command[event.operation].name + '”';
|
||||
const params = command[event.operation].params;
|
||||
if (params && params.length > 0) {
|
||||
params.forEach(each=>{
|
||||
result += ', ' + each.name + event.operationParamMap[each.code];
|
||||
});
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
},
|
||||
handleDeviceType(code) {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](code);
|
||||
return deviceType[device.type];
|
||||
},
|
||||
handleDeviceName(code) {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](code);
|
||||
return device.name;
|
||||
},
|
||||
handleSizeChange(newPageSize) {
|
||||
if (newPageSize) {
|
||||
this.pageSize = newPageSize;
|
||||
// {pageSize:this.pageSize, pageNum:this.pageIndex}
|
||||
this.changePage(this.pageIndex);
|
||||
}
|
||||
},
|
||||
changePage(pageIndex) {
|
||||
this.pageIndex = pageIndex;
|
||||
this.queryData();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
/deep/ .el-dialog .el-input {
|
||||
border: 0 !important;
|
||||
}
|
||||
</style>
|
168
src/jmapNew/theme/nanjing_02/menus/menuSection.vue
Normal file
168
src/jmapNew/theme/nanjing_02/menus/menuSection.vue
Normal file
@ -0,0 +1,168 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" pop-menu-class="haerbin-01__systerm" />
|
||||
<notice-info ref="noticeInfo" pop-class="haerbin-01__systerm" />
|
||||
<train-add-plan ref="trainAddPlan" pop-class="haerbin-01__systerm" />
|
||||
<set-fault ref="setFault" pop-class="haerbin-01__systerm" />
|
||||
<load-spare-train ref="loadSpareTrain" pop-class="haerbin-01__systerm" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import TrainAddPlan from '@/jmapNew/theme/components/menus/dialog/trainAddPlan';
|
||||
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import LoadSpareTrain from '@/jmapNew/theme/components/menus/dialog/loadSpareTrain';
|
||||
|
||||
export default {
|
||||
name: 'SectionMenu',
|
||||
components: {
|
||||
PopMenu,
|
||||
NoticeInfo,
|
||||
TrainAddPlan,
|
||||
SetFault,
|
||||
LoadSpareTrain
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
Local: [
|
||||
],
|
||||
Center: [
|
||||
]
|
||||
},
|
||||
menuForce: [
|
||||
{
|
||||
label: '设置故障',
|
||||
handler: this.setStoppage,
|
||||
cmdType: CMD.Fault.CMD_SET_FAULT
|
||||
},
|
||||
{
|
||||
label: '取消故障',
|
||||
handler: this.cancelStoppage,
|
||||
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
||||
},
|
||||
{
|
||||
label: '触发故障管理',
|
||||
handler: this.triggerFaultManagement,
|
||||
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
|
||||
},
|
||||
{
|
||||
label: '设置备用车',
|
||||
handler: this.loadSpare,
|
||||
cmdType: CMD.Section.CMD_TRAIN_LOAD_SPARE_TRAIN
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'operatemode'
|
||||
]),
|
||||
...mapGetters('menuOperation', [
|
||||
'buttonOperation'
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Section) && !this.buttonOperation) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
// const isDev = process.env.NODE_ENV === 'development';
|
||||
// if (isDev) {
|
||||
// this.menuNormal.Center.push({
|
||||
// label: '新建计划车',
|
||||
// handler: this.addPlanTrain,
|
||||
// cmdType: CMD.Section.CMD_Train_Init_Plan
|
||||
// });
|
||||
// }
|
||||
},
|
||||
methods: {
|
||||
clickEvent() {
|
||||
const self = this;
|
||||
window.onclick = function (e) {
|
||||
self.doClose();
|
||||
};
|
||||
},
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
if (this.selected.type != '04') {
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
} else {
|
||||
this.menu = [];
|
||||
}
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT && this.selected.type != '04') {
|
||||
this.menu = this.menuForce;
|
||||
}
|
||||
},
|
||||
loadSpare() {
|
||||
commitOperate(menuOperate.Section.loadSpareTrain, {sectionCode:this.selected.code}).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.loadSpareTrain.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
doShow(point) {
|
||||
this.clickEvent();
|
||||
this.initMenu();
|
||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||
this.$refs.popMenu.resetShowPosition(point);
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
// // 新建计划车(开发专用)
|
||||
// addPlanTrain() {
|
||||
// commitOperate(menuOperate.Train.createPlanTrain, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
// if (valid) {
|
||||
// this.$refs.trainAddPlan.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() {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
triggerFaultManagement() {
|
||||
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
130
src/jmapNew/theme/nanjing_02/menus/menuSignal.vue
Normal file
130
src/jmapNew/theme/nanjing_02/menus/menuSignal.vue
Normal file
@ -0,0 +1,130 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" pop-class="haerbin-01__systerm" />
|
||||
<set-fault ref="setFault" pop-class="haerbin-01__systerm" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'SignalMenu',
|
||||
components: {
|
||||
PopMenu,
|
||||
NoticeInfo,
|
||||
SetFault
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
systemName:'xian-01__systerm',
|
||||
menuNormal: {
|
||||
Local: [
|
||||
],
|
||||
Center: [
|
||||
]
|
||||
},
|
||||
menuForce: [
|
||||
{
|
||||
label: '设置故障',
|
||||
handler: this.setStoppage,
|
||||
cmdType: CMD.Fault.CMD_SET_FAULT
|
||||
},
|
||||
{
|
||||
label: '取消故障',
|
||||
handler: this.cancelStoppage,
|
||||
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
||||
},
|
||||
{
|
||||
label: '触发故障管理',
|
||||
handler: this.triggerFaultManagement,
|
||||
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'operatemode'
|
||||
]),
|
||||
...mapGetters('menuOperation', [
|
||||
'buttonOperation'
|
||||
]),
|
||||
group() {
|
||||
return this.$route.query.group;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Signal) && !this.buttonOperation) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clickEvent() {
|
||||
const self = this;
|
||||
window.onclick = function (e) {
|
||||
self.doClose();
|
||||
};
|
||||
},
|
||||
initMenu() {
|
||||
this.menu = [];
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
this.menu = this.menuForce;
|
||||
}
|
||||
},
|
||||
doShow(point) {
|
||||
this.clickEvent();
|
||||
this.initMenu();
|
||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||
this.$refs.popMenu.resetShowPosition(point);
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
// 设置故障
|
||||
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);
|
||||
}
|
||||
});
|
||||
},
|
||||
triggerFaultManagement() {
|
||||
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
162
src/jmapNew/theme/nanjing_02/menus/menuStation.vue
Normal file
162
src/jmapNew/theme/nanjing_02/menus/menuStation.vue
Normal file
@ -0,0 +1,162 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" pop-menu-class="haerbin-01__systerm" />
|
||||
<notice-info ref="noticeInfo" pop-class="haerbin-01__systerm" />
|
||||
<set-fault ref="setFault" pop-class="haerbin-01__systerm" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
import { DeviceMenu } from '@/scripts/ConstDic';
|
||||
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'StationMenu',
|
||||
components: {
|
||||
PopMenu,
|
||||
SetFault,
|
||||
NoticeInfo
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
Local: [
|
||||
],
|
||||
Center: [
|
||||
]
|
||||
},
|
||||
menuForce: [
|
||||
{
|
||||
label: '设置ZC故障',
|
||||
handler: this.setStoppage,
|
||||
cmdType: CMD.Station.CMD_STATION_ADD_FAULT
|
||||
},
|
||||
{
|
||||
label: '取消ZC故障',
|
||||
handler: this.cancelStoppage,
|
||||
cmdType: CMD.Station.CMD_STATION_REMOVE_FAULT
|
||||
},
|
||||
{
|
||||
label: '设置车站故障',
|
||||
handler: this.setStationStoppage,
|
||||
cmdType: CMD.Station.CMD_STATION_ADD_FAULT
|
||||
},
|
||||
{
|
||||
label: '取消车站故障',
|
||||
handler: this.cancelStationStoppage,
|
||||
cmdType: CMD.Station.CMD_STATION_REMOVE_FAULT
|
||||
},
|
||||
{
|
||||
label: '触发故障管理',
|
||||
handler: this.triggerFaultManagement,
|
||||
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'operatemode'
|
||||
]),
|
||||
...mapGetters('menuOperation', [
|
||||
'buttonOperation'
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Station) && !this.buttonOperation) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clickEvent() {
|
||||
const self = this;
|
||||
window.onclick = function (e) {
|
||||
self.doClose();
|
||||
};
|
||||
},
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
this.menu = [...this.menuForce];
|
||||
}
|
||||
},
|
||||
doShow(point) {
|
||||
if (this.selected.ciStation) {
|
||||
this.clickEvent();
|
||||
this.initMenu();
|
||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||
this.$refs.popMenu.resetShowPosition(point);
|
||||
}
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{
|
||||
if (valid && this.selected.zcCode) {
|
||||
const zcSelected = this.$store.getters['map/getDeviceByCode'](this.selected.zcCode);
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, zcSelected);
|
||||
} else if (!this.selected.zcCode) {
|
||||
console.error('该车站无zc设备');
|
||||
}
|
||||
});
|
||||
},
|
||||
setStationStoppage() {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
cancelStationStoppage() {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.zcCode }, 0).then(({valid, operate})=>{
|
||||
if (valid && this.selected.zcCode) {
|
||||
const zcSelected = this.$store.getters['map/getDeviceByCode'](this.selected.zcCode);
|
||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, zcSelected);
|
||||
} else if (!this.selected.zcCode) {
|
||||
console.error('该车站无zc设备');
|
||||
}
|
||||
});
|
||||
},
|
||||
triggerFaultManagement() {
|
||||
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
130
src/jmapNew/theme/nanjing_02/menus/menuStationStand.vue
Normal file
130
src/jmapNew/theme/nanjing_02/menus/menuStationStand.vue
Normal file
@ -0,0 +1,130 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" pop-menu-class="haerbin-01__systerm" />
|
||||
<notice-info ref="noticeInfo" pop-class="haerbin-01__systerm" />
|
||||
<set-fault ref="setFault" pop-class="haerbin-01__systerm" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'StationStandMenu',
|
||||
components: {
|
||||
PopMenu,
|
||||
NoticeInfo,
|
||||
SetFault
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
Local: [
|
||||
],
|
||||
Center: [
|
||||
]
|
||||
},
|
||||
menuForce: [
|
||||
{
|
||||
label: this.$t('menu.menuStationStand.setFault'),
|
||||
handler: this.setStoppage,
|
||||
cmdType:CMD.Stand.CMD_STAND_ADD_FAULT
|
||||
},
|
||||
{
|
||||
label: this.$t('menu.menuStationStand.cancelFault'),
|
||||
handler: this.cancelStoppage,
|
||||
cmdType:CMD.Stand.CMD_STAND_REMOVE_FAULT
|
||||
},
|
||||
{
|
||||
label: '触发故障管理',
|
||||
handler: this.triggerFaultManagement,
|
||||
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'operatemode'
|
||||
]),
|
||||
...mapGetters('menuOperation', [
|
||||
'buttonOperation'
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.StationStand) && !this.buttonOperation) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clickEvent() {
|
||||
const self = this;
|
||||
window.onclick = function (e) {
|
||||
self.doClose();
|
||||
};
|
||||
},
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
this.menu = this.menuForce;
|
||||
}
|
||||
|
||||
},
|
||||
doShow(point) {
|
||||
this.clickEvent();
|
||||
this.initMenu();
|
||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||
this.$refs.popMenu.resetShowPosition(point);
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
// 设置故障
|
||||
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);
|
||||
}
|
||||
});
|
||||
},
|
||||
triggerFaultManagement() {
|
||||
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
144
src/jmapNew/theme/nanjing_02/menus/menuSwitch.vue
Normal file
144
src/jmapNew/theme/nanjing_02/menus/menuSwitch.vue
Normal file
@ -0,0 +1,144 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" pop-menu-class="haerbin-01__systerm" />
|
||||
<notice-info ref="noticeInfo" pop-class="haerbin-01__systerm" />
|
||||
<switch-hook-lock ref="switchHookLock" pop-class="haerbin-01__systerm" />
|
||||
<set-fault ref="setFault" pop-class="haerbin-01__systerm" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import SwitchHookLock from '@/jmapNew/theme/components/menus/dialog/switchHookLock';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'SwitchMenu',
|
||||
components: {
|
||||
PopMenu,
|
||||
NoticeInfo,
|
||||
SetFault,
|
||||
SwitchHookLock
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
Local: [
|
||||
],
|
||||
Center: [
|
||||
]
|
||||
},
|
||||
menuForce: [
|
||||
{
|
||||
label: '设置故障',
|
||||
handler: this.setStoppage,
|
||||
cmdType: CMD.Fault.CMD_SET_FAULT
|
||||
},
|
||||
{
|
||||
label: '取消故障',
|
||||
handler: this.cancelStoppage,
|
||||
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
||||
},
|
||||
{
|
||||
label: '触发故障管理',
|
||||
handler: this.triggerFaultManagement,
|
||||
cmdType: CMD.Fault.CMD_TRIGGER_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) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clickEvent() {
|
||||
const self = this;
|
||||
window.onclick = function (e) {
|
||||
self.doClose();
|
||||
};
|
||||
},
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
if (!this.$store.state.scriptRecord.bgSet) {
|
||||
const menuHook = [{
|
||||
label: '道岔钩锁',
|
||||
handler: this.hookLock
|
||||
}];
|
||||
this.menu = [...this.menuForce, ...menuHook];
|
||||
} else {
|
||||
this.menu = this.menuForce;
|
||||
}
|
||||
}
|
||||
},
|
||||
doShow(point) {
|
||||
this.clickEvent();
|
||||
this.initMenu();
|
||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||
this.$refs.popMenu.resetShowPosition(point);
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
// 设置故障
|
||||
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);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 道岔钩锁
|
||||
hookLock() {
|
||||
this.$refs.switchHookLock.doShow(this.selected);
|
||||
},
|
||||
triggerFaultManagement() {
|
||||
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
357
src/jmapNew/theme/nanjing_02/menus/menuTrain.vue
Normal file
357
src/jmapNew/theme/nanjing_02/menus/menuTrain.vue
Normal file
@ -0,0 +1,357 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<notice-info ref="noticeInfo" pop-class="haerbin-01__systerm" />
|
||||
<!-- <train-control ref="trainControl" /> -->
|
||||
<!-- <train-delete ref="trainDelete" /> -->
|
||||
<!-- <train-move ref="trainMove" /> -->
|
||||
<!-- <train-switch ref="trainSwitch" /> -->
|
||||
<!-- <train-edit-number ref="trainEditNumber" /> -->
|
||||
<set-fault ref="setFault" pop-class="haerbin-01__systerm" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
// import TrainControl from './dialog/trainControl';
|
||||
// import TrainDelete from './dialog/trainDelete';
|
||||
// import TrainMove from './dialog/trainMove';
|
||||
// import TrainSwitch from './dialog/trainSwitch';
|
||||
// import TrainEditNumber from './dialog/trainEditNumber';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import { menuOperate, commitOperate, commitTrainSend } from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'MenuTrain',
|
||||
components: {
|
||||
PopMenu,
|
||||
NoticeInfo,
|
||||
// TrainControl,
|
||||
// TrainDelete,
|
||||
// TrainMove,
|
||||
// TrainSwitch,
|
||||
// TrainEditNumber,
|
||||
SetFault
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
Local: [
|
||||
],
|
||||
Center: [
|
||||
]
|
||||
},
|
||||
menuForce: [
|
||||
{
|
||||
label: '设置故障',
|
||||
handler: this.setStoppage
|
||||
},
|
||||
{
|
||||
label: '取消故障',
|
||||
handler: this.cancelStoppage
|
||||
},
|
||||
{
|
||||
label: '触发故障管理',
|
||||
handler: this.triggerFaultManagement,
|
||||
cmdType: CMD.Fault.CMD_TRIGGER_FAULT
|
||||
}
|
||||
],
|
||||
menuDirective: [
|
||||
{
|
||||
label: '确认运行至前方站',
|
||||
handler: this.nextStation
|
||||
},
|
||||
{
|
||||
label: '进路闭塞法行车',
|
||||
handler: this.routeBlockRun
|
||||
},
|
||||
{
|
||||
label: '越引导信号行驶',
|
||||
handler: this.handleOverFuideSignal
|
||||
},
|
||||
{
|
||||
label: '越红灯行驶',
|
||||
handler: this.handleOverEedLight
|
||||
}
|
||||
],
|
||||
menuSpeed: [
|
||||
{
|
||||
label: '限速行驶',
|
||||
handler: this.limitSpeed,
|
||||
cmdType:CMD.Train.CMD_TRAIN_MANUAL_LIMIT_DRIVE
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'operatemode',
|
||||
'memberList'
|
||||
]),
|
||||
...mapGetters('menuOperation', [
|
||||
'buttonOperation'
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function () {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Train) && !this.buttonOperation) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clickEvent() {
|
||||
const self = this;
|
||||
window.onclick = function (e) {
|
||||
self.doClose();
|
||||
};
|
||||
},
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
if (this.operatemode === OperateMode.ADMIN) {
|
||||
this.menu = [...this.menu, ...this.menuForce, ...this.menuSpeed];
|
||||
}
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
if (!this.$store.state.scriptRecord.bgSet) {
|
||||
this.menu = [...this.menuForce, ...this.menuDirective];
|
||||
} else {
|
||||
this.menu = [...this.menuForce];
|
||||
}
|
||||
}
|
||||
// 指令模式列表
|
||||
if (this.operatemode === OperateMode.DIRECTIVE) {
|
||||
if (!this.$store.state.scriptRecord.bgSet) {
|
||||
this.menu = [...this.menuDirective];
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
doShow(point) {
|
||||
this.clickEvent();
|
||||
this.initMenu();
|
||||
|
||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||
this.$refs.popMenu.resetShowPosition(point);
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
// 设置故障
|
||||
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);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 限速行驶
|
||||
limitSpeed() {
|
||||
const step = {
|
||||
start: true,
|
||||
operation: OperationEvent.Train.limitSpeed.menu.operation,
|
||||
cmdType: CMD.Train.CMD_LIMIT_SPEED,
|
||||
param: {
|
||||
code: this.selected.code
|
||||
}
|
||||
};
|
||||
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();
|
||||
});
|
||||
},
|
||||
nextStation() {
|
||||
const group = this.$route.query.group;
|
||||
const param = {
|
||||
commandType: 'Drive_Ahead',
|
||||
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
|
||||
params: {}
|
||||
};
|
||||
commitTrainSend(group, param).then(({valid, operate})=>{
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
routeBlockRun() {
|
||||
const group = this.$route.query.group;
|
||||
const param = {
|
||||
commandType: 'Drive_Ahead',
|
||||
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
|
||||
params: {}
|
||||
};
|
||||
commitTrainSend(group, param).then(({valid, operate})=>{
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
handleOverFuideSignal() {
|
||||
const group = this.$route.query.group;
|
||||
const param = {
|
||||
commandType: 'Drive_Through_The_Guide_Signal',
|
||||
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
|
||||
params: {}
|
||||
};
|
||||
commitTrainSend(group, param).then(({valid, operate})=>{
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
handleOverEedLight() {
|
||||
const group = this.$route.query.group;
|
||||
const param = {
|
||||
commandType: 'Drive_Through_The_Red_Light',
|
||||
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
|
||||
params: {}
|
||||
};
|
||||
commitTrainSend(group, param).then(({valid, operate})=>{
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
triggerFaultManagement() {
|
||||
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
|
||||
}
|
||||
// // 添加列车识别号
|
||||
// addTrainId() {
|
||||
// const step = {
|
||||
// start: true,
|
||||
|
||||
// operation: OperationEvent.Train.addTrainId.menu.operation,
|
||||
// param: {
|
||||
// code: this.selected.code
|
||||
// }
|
||||
// };
|
||||
// this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
// if (valid) {
|
||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
// this.$refs.trainControl.doShow(step, this.selected);
|
||||
// }
|
||||
// });
|
||||
// },
|
||||
// // 删除列车识别号
|
||||
// delTrainId() {
|
||||
// const step = {
|
||||
// start: true,
|
||||
|
||||
// operation: OperationEvent.Train.delTrainId.menu.operation,
|
||||
// param: {
|
||||
// code: this.selected.code
|
||||
// }
|
||||
// };
|
||||
// this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
// if (valid) {
|
||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
// this.$refs.trainDelete.doShow(step, this.selected);
|
||||
// }
|
||||
// });
|
||||
// },
|
||||
// // 修改列车识别号
|
||||
// editTrainId() {
|
||||
// const step = {
|
||||
// start: true,
|
||||
|
||||
// operation: OperationEvent.Train.editTrainId.menu.operation,
|
||||
// param: {
|
||||
// code: this.selected.code
|
||||
// }
|
||||
// };
|
||||
// this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
// if (valid) {
|
||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
// this.$refs.trainControl.doShow(step, this.selected);
|
||||
// }
|
||||
// });
|
||||
// },
|
||||
// // 修改车组号
|
||||
// editTrainNo() {
|
||||
// const step = {
|
||||
// start: true,
|
||||
|
||||
// operation: OperationEvent.Train.editTrainNo.menu.operation,
|
||||
// param: {
|
||||
// code: this.selected.code
|
||||
// }
|
||||
// };
|
||||
// this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
// if (valid) {
|
||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
// this.$refs.trainEditNumber.doShow(step, this.selected);
|
||||
// }
|
||||
// });
|
||||
// },
|
||||
// // 移动列车识别号
|
||||
// moveTrainId() {
|
||||
// const step = {
|
||||
// start: true,
|
||||
|
||||
// operation: OperationEvent.Train.moveTrainId.menu.operation,
|
||||
// param: {
|
||||
// code: this.selected.code
|
||||
// }
|
||||
// };
|
||||
// this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
// if (valid) {
|
||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
// this.$refs.trainMove.doShow(step, this.selected);
|
||||
// }
|
||||
// });
|
||||
// },
|
||||
// // 交换列车识别号
|
||||
// switchTrainId() {
|
||||
// const step = {
|
||||
// start: true,
|
||||
|
||||
// operation: OperationEvent.Train.switchTrainId.menu.operation,
|
||||
// param: {
|
||||
// code: this.selected.code
|
||||
// }
|
||||
// };
|
||||
// this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
// if (valid) {
|
||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
// this.$refs.trainSwitch.doShow(step, this.selected);
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
}
|
||||
};
|
||||
</script>
|
218
src/jmapNew/theme/nanjing_02/menus/passiveDialog/alarm.vue
Normal file
218
src/jmapNew/theme/nanjing_02/menus/passiveDialog/alarm.vue
Normal file
@ -0,0 +1,218 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="haerbin-01__systerm alarm-detail"
|
||||
:title="level+$t('menu.passiveDialog.alarmDetailInformation')"
|
||||
:visible.sync="show"
|
||||
width="760px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form label-width="80px" size="mini">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="$t('menu.passiveDialog.lineName')">
|
||||
<el-input v-model="model.lineName" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="$t('menu.passiveDialog.unitName')">
|
||||
<el-input v-model="model.unitName" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="$t('menu.passiveDialog.moduleName')">
|
||||
<el-input v-model="model.moduleName" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="9">
|
||||
<el-form-item :label="$t('menu.passiveDialog.alarmDate')">
|
||||
<el-date-picker v-model="model.alarmDate" type="datetime" :placeholder="$t('menu.passiveDialog.selectDate')" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="7">
|
||||
<el-form-item>
|
||||
<span slot="label">{{ $t('menu.passiveDialog.level') }}</span>
|
||||
<el-input v-model="model.level" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item :label="$t('menu.passiveDialog.confirmStatus')">
|
||||
<el-input v-model="model.confirm" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="9" class="alarm-type">
|
||||
<el-form-item>
|
||||
<span slot="label">{{ $t('menu.passiveDialog.type') }}</span>
|
||||
<el-input v-model="model.type" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="15" class="alarm-child-type">
|
||||
<el-form-item :label="$t('menu.passiveDialog.childType')">
|
||||
<el-input v-model="model.childType" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item :label="$t('menu.passiveDialog.timeSummary')">
|
||||
<el-input v-model="model.timeSummary" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('menu.passiveDialog.recommendedOperation')">
|
||||
<el-input v-model="model.recommendedOperation" disabled />
|
||||
</el-form-item>
|
||||
<div class="alarm-detail-description">
|
||||
<span>{{ $t('menu.passiveDialog.alarmDetailedDescription') }}</span><br>
|
||||
<el-input v-model="model.alarmDetail" type="textarea" :rows="5" :placeholder="$t('menu.passiveDialog.inputContent')" disabled />
|
||||
</div>
|
||||
</el-form>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="3" :offset="9">
|
||||
<el-button :id="domIdCancel" type="primary" :loading="loading" @click="commit">{{ $t('menu.passiveDialog.confirm') }}</el-button>
|
||||
</el-col>
|
||||
<el-col :span="10">
|
||||
<span style="line-height:26px">{{ $t('menu.passiveDialog.unconfirmedMessageOne') }}{{ level }}{{ $t('menu.passiveDialog.unconfirmedMessageTwo') }}</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
export default {
|
||||
name: 'AlarmDetail',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
level: 0,
|
||||
operate: null,
|
||||
controlProps: {
|
||||
'01': this.$t('menu.passiveDialog.centralControl'),
|
||||
'02': this.$t('menu.passiveDialog.stationControl')
|
||||
},
|
||||
model: {
|
||||
lineName: '',
|
||||
unitName: '',
|
||||
moduleName: '',
|
||||
level: '',
|
||||
confirm: '',
|
||||
alarmDate: '',
|
||||
type: '',
|
||||
childType: '',
|
||||
timeSummary: '',
|
||||
recommendedOperation: '',
|
||||
alarmDetail: ''
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'name'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.alarm.domId : '';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.socket.msgHead': function (elem) {
|
||||
if (elem && elem.type == 'resp' && elem.agree) {
|
||||
if (elem.agree) {
|
||||
const operate = this.$store.state.training.operate;
|
||||
const control = this.$store.getters['map/getDeviceByCode'](elem.stationControlCode);
|
||||
const station = this.$store.getters['map/getDeviceByCode'](control.stationCode);
|
||||
const newOperate = {
|
||||
type: operate.type,
|
||||
name: station.name,
|
||||
currentMode: elem.currentMode
|
||||
};
|
||||
|
||||
this.doShow(newOperate);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
this.operate = operate || {};
|
||||
this.model = {
|
||||
lineName: this.name,
|
||||
unitName: this.operate.name,
|
||||
moduleName: this.$t('menu.passiveDialog.cmmControlModeConversionMode'),
|
||||
level: this.$t('menu.passiveDialog.zeroLevelAlarm'),
|
||||
confirm: this.$t('menu.passiveDialog.confirmStatus'),
|
||||
alarmDate: new Date(),
|
||||
type: this.$t('menu.passiveDialog.systemEvent'),
|
||||
childType: this.$t('menu.passiveDialog.childTypeTips'),
|
||||
timeSummary: this.$t('menu.passiveDialog.controlModeSummary'),
|
||||
recommendedOperation: '',
|
||||
alarmDetail: `${this.$t('menu.passiveDialog.controlModeTransfer')} ${this.operate.name}${this.$t('menu.passiveDialog.alarmDetailOne')}${operate.currentMode == '01' ? this.$t('menu.passiveDialog.stationToCentral') : this.$t('menu.passiveDialog.centralToStation')}!`
|
||||
};
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
if (this.dialogShow) {
|
||||
this.$store.dispatch('socket/shiftMsgQueue');
|
||||
}
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.close.alarm.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.close.alarm.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
},
|
||||
isClose() {
|
||||
return this.dialogShow;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
|
||||
.alarm-type .el-input {
|
||||
width: 220px;
|
||||
}
|
||||
|
||||
.alarm-detail-description {
|
||||
padding-left: 12px;
|
||||
text-align: left;
|
||||
}
|
||||
</style>
|
111
src/jmapNew/theme/nanjing_02/menus/passiveDialog/timeout.vue
Normal file
111
src/jmapNew/theme/nanjing_02/menus/passiveDialog/timeout.vue
Normal file
@ -0,0 +1,111 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="haerbin-01__systerm cmd-notice"
|
||||
:title="$t('menu.passiveDialog.operationCommandTips')"
|
||||
:visible.sync="show"
|
||||
width="400px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<span>{{ name }},{{ msg }}!</span>
|
||||
<el-row class="button-group">
|
||||
<el-button :id="domIdCancel" type="primary" :loading="loading" @click="commit">{{ $t('menu.passiveDialog.operationConfirm') }}</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
export default {
|
||||
name: 'CmdNotice',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operate: null,
|
||||
name: '',
|
||||
msg: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.notice.domId : '';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.socket.msgHead': function (elem) {
|
||||
if (elem && elem.type == 'resp' && (elem.timeout || !elem.agree)) {
|
||||
const control = this.$store.getters['map/getDeviceByCode'](elem.stationControlCode);
|
||||
const station = this.$store.getters['map/getDeviceByCode'](control.stationCode);
|
||||
const newOperate = {
|
||||
name: station.name
|
||||
};
|
||||
|
||||
if (elem.timeout) {
|
||||
newOperate['msg'] = this.$t('menu.passiveDialog.requestTimedOut');
|
||||
this.doShow(newOperate);
|
||||
} else if (!elem.agree) {
|
||||
newOperate['msg'] = this.$t('menu.passiveDialog.requestRejection');
|
||||
this.doShow(newOperate);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
this.operate = operate || {};
|
||||
this.name = this.operate.name || '';
|
||||
this.msg = this.operate.msg || '';
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
if (this.dialogShow) {
|
||||
this.$store.dispatch('socket/shiftMsgQueue');
|
||||
}
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.close.notice.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.close.notice.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
},
|
||||
isClose() {
|
||||
return this.dialogShow;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
72
src/jmapNew/theme/nanjing_02/model.js
Normal file
72
src/jmapNew/theme/nanjing_02/model.js
Normal file
@ -0,0 +1,72 @@
|
||||
import deviceType from '../../constant/deviceType';
|
||||
|
||||
class Model {
|
||||
constructor() {
|
||||
this.screenLine = 3;
|
||||
this.screenDifference = 50;
|
||||
// 公共字段部分默认初始值
|
||||
this['public'] = {};
|
||||
this['public'][deviceType.Signal] = {
|
||||
lampPositionType: '02',
|
||||
lampPostType: '02'
|
||||
};
|
||||
|
||||
// 私有字段部分默认初始值
|
||||
this['private'] = {};
|
||||
this['private'][deviceType.StationControl] = {
|
||||
indicatorShow: true // 标识灯名称显示
|
||||
};
|
||||
this['private'][deviceType.Station] = {
|
||||
kmPostShow: true // 公里标显示
|
||||
};
|
||||
this['private'][deviceType.Switch] = {
|
||||
nameShow: true
|
||||
};
|
||||
this['private'][deviceType.Section] = {
|
||||
nameShow: true,
|
||||
borderBorderShow: true, // 区段边界显示
|
||||
destinationNameShow: true, // 目的地码名称显示
|
||||
standTrackNameShow: true, // 站台轨名称显示
|
||||
reentryTrackNameShow: true, // 折返轨名称显示
|
||||
transferTrackNameShow: true // 转换轨名称显示
|
||||
};
|
||||
this['private'][deviceType.Signal] = {
|
||||
nameShow: true, // 信号机名称显示
|
||||
linkageAutoRouteShow: true, // 联锁自动进路表示灯显示
|
||||
atsAutoTriggerShow: true // ATS自动触发表示灯显示
|
||||
};
|
||||
this['private'][deviceType.Train] = {
|
||||
};
|
||||
this['private'][deviceType.TrainWindow] = {
|
||||
trainWindowShow: true
|
||||
};
|
||||
}
|
||||
|
||||
initPublicProps(model) {
|
||||
if (model) {
|
||||
var modelInitial = this.public[model._type];
|
||||
if (modelInitial) {
|
||||
for (var prop in modelInitial) {
|
||||
model[prop] = modelInitial[prop];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return model;
|
||||
}
|
||||
|
||||
initPrivateProps(model) {
|
||||
if (model) {
|
||||
var modelInitial = this.private[model._type];
|
||||
if (modelInitial) {
|
||||
for (var prop in modelInitial) {
|
||||
model[prop] = modelInitial[prop];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return model;
|
||||
}
|
||||
}
|
||||
|
||||
export default new Model();
|
1082
src/jmapNew/theme/nanjing_02/operationConfig.js
Normal file
1082
src/jmapNew/theme/nanjing_02/operationConfig.js
Normal file
File diff suppressed because it is too large
Load Diff
380
src/jmapNew/theme/nanjing_02/planConvert.js
Normal file
380
src/jmapNew/theme/nanjing_02/planConvert.js
Normal file
@ -0,0 +1,380 @@
|
||||
import { createMartPoint, createSeriesModel, createMarkLineModels, hexColor, prefixTime, convertSheetToList } from '@/utils/runPlan';
|
||||
import store from '@/store/index';
|
||||
export default {
|
||||
/** 边缘高度*/
|
||||
EdgeHeight: 3,
|
||||
|
||||
/** 间隔高度*/
|
||||
CoordMultiple: 3,
|
||||
|
||||
/** 偏移时间*/
|
||||
TranslationTime: 60 * 60 * 2,
|
||||
|
||||
/** excel解析配置*/
|
||||
ExcelConfig: {
|
||||
beginRow: 1,
|
||||
beginCol: 0,
|
||||
// fieldNum: 10,
|
||||
columns: {
|
||||
'默认上行折返轨': { key: 'upTrack', formatter: (val) => { return val; } },
|
||||
'默认下行折返轨': { key: 'downTrack', formatter: (val) => { return val; } }
|
||||
}
|
||||
},
|
||||
|
||||
/** 解析exal数据转换为Json后台数据*/
|
||||
importData(Sheet, JsonData) {
|
||||
const dataList = convertSheetToList(Sheet, true);
|
||||
const needList = Object.keys(this.ExcelConfig.columns);
|
||||
const tripObj = { upTrack: '', downTrack: '' };
|
||||
if (dataList && dataList.length && dataList[1] && dataList[0]) {
|
||||
const tIndex = dataList.findIndex(it => { return it[0]; });
|
||||
if (dataList[0][0] == needList[0] && dataList[1][0] == needList[1]) {
|
||||
for (var colIndex = this.ExcelConfig.beginCol; colIndex < dataList.length; colIndex += 1) {
|
||||
var isContinue = true;
|
||||
|
||||
for (var rowIndex = this.ExcelConfig.beginRow; isContinue; rowIndex += 1) {
|
||||
isContinue = false;
|
||||
|
||||
var title = dataList[colIndex][0];
|
||||
var value = dataList[colIndex][rowIndex];
|
||||
|
||||
if (title && value) {
|
||||
// 数据列解析
|
||||
isContinue = true;
|
||||
var titleStr = `${title}`.replace(/\s*/g, '');
|
||||
var valueStr = `${value}`.replace(/\s*/g, '');
|
||||
|
||||
// 取需要的字段
|
||||
if (needList.findIndex(elem => { return elem == titleStr; }) >= 0) {
|
||||
tripObj[this.ExcelConfig.columns[titleStr].key] = this.ExcelConfig.columns[titleStr].formatter(valueStr);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
} else {
|
||||
/** 解析二维数组为json对象*/
|
||||
const reg0 = /^[↑|↓|¡|ü|ý|]+(.*)/; // ↑|↓
|
||||
const reg1 = /^([▼|▲|¡ø|¨]+)\s*(\d+:\d+:\d+)/; // ▲ 06:10:00
|
||||
const reg2 = /^(\d+:\d+:\d+)\s*([▼|▲|¡ø|¨]+)/; // 06:10:00 ▲
|
||||
const reg3 = /^(\d+:\d+:\d+)\s*(\d+:\d+:\d+|)/; // 06:10:00 06:12:00
|
||||
const reg4 = /[▼|▲|¡|ø|¨|]+/; // ▲
|
||||
|
||||
dataList.forEach((elem, i) => {
|
||||
var begin = -1;
|
||||
/** 跳过名称所在的行*/
|
||||
if (i != tIndex && elem && elem.length > 0) {
|
||||
elem.forEach((item, j) => {
|
||||
/** 过滤空值*/
|
||||
if (item) {
|
||||
var value = `${item}`.trim();
|
||||
var title = `${dataList[tIndex][j]}`.replace(/\s*/g, '');
|
||||
/** 匹配到开始位置或者结束位置*/
|
||||
if (reg0.test(value)) {
|
||||
if (begin == -1) {
|
||||
begin = value; // 设置初始索引
|
||||
JsonData.push({
|
||||
code: reg0.exec(value)[1],
|
||||
arrivalList: []
|
||||
});
|
||||
} else if (begin === value) {
|
||||
begin = -1; // 清空初始索引
|
||||
}
|
||||
} else if (begin !== -1) {
|
||||
/** 匹配到中间位置*/
|
||||
var begTime, endTime;
|
||||
var runFlag = JsonData[JsonData.length - 1].code[2];
|
||||
var stationName = title.replace(/\s/, '');
|
||||
var need = false;
|
||||
var flag = false;
|
||||
if (reg1.test(value)) {
|
||||
/** 含有特殊字符的时间格式*/
|
||||
[, begTime, endTime] = reg1.exec(value);
|
||||
|
||||
begTime = reg4.test(begTime) ? '' : begTime;
|
||||
endTime = reg4.test(endTime) ? '' : endTime;
|
||||
|
||||
/** 下行方向时间互换*/
|
||||
if (runFlag === '2') {
|
||||
[begTime, endTime] = [endTime, begTime];
|
||||
}
|
||||
|
||||
/** 设置标志*/
|
||||
[need, flag] = [true, true];
|
||||
} else if (reg2.test(value)) {
|
||||
/** 含有特殊字符的时间格式*/
|
||||
[, begTime, endTime] = reg2.exec(value);
|
||||
|
||||
begTime = reg4.test(begTime) ? '' : begTime;
|
||||
endTime = reg4.test(endTime) ? '' : endTime;
|
||||
|
||||
/** 下行方向时间互换*/
|
||||
if (runFlag === '2') {
|
||||
[begTime, endTime] = [endTime, begTime];
|
||||
}
|
||||
|
||||
/** 设置标志*/
|
||||
[need, flag] = [true, true];
|
||||
} else if (reg3.test(value)) {
|
||||
/** 正常时间格式*/
|
||||
[, begTime, endTime] = reg3.exec(value);
|
||||
|
||||
/** 如果只存在一个数据时,则开始和结束设置一样*/
|
||||
endTime = endTime || begTime;
|
||||
|
||||
/** 下行方向时间互换*/
|
||||
if (runFlag === '2') {
|
||||
[begTime, endTime] = [endTime, begTime];
|
||||
}
|
||||
|
||||
/** 设置标志*/
|
||||
[need, flag] = [true, false];
|
||||
}
|
||||
|
||||
/** 添加json数据*/
|
||||
if (need) { // 储存非空 数据
|
||||
var stationObj = {
|
||||
stationName: stationName
|
||||
};
|
||||
|
||||
if (begTime) { stationObj['arriveTime'] = prefixTime(begTime); }
|
||||
if (endTime) { stationObj['departureTime'] = prefixTime(endTime); }
|
||||
if (flag) { stationObj['flag'] = flag; } // 是否转换轨
|
||||
JsonData[JsonData.length - 1].arrivalList.push(stationObj);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
JsonData.forEach(item => {
|
||||
item['upTrack'] = tripObj.upTrack;
|
||||
item['downTrack'] = tripObj.downTrack;
|
||||
});
|
||||
|
||||
return JsonData;
|
||||
},
|
||||
|
||||
/** 将后台数据解析成图表*/
|
||||
convertDataToModels(data, stations, kmRangeCoordMap, lineStyle) {
|
||||
var models = [];
|
||||
|
||||
if (data && data.serviceNumberDataList && data.serviceNumberDataList.length) {
|
||||
/** 按服务遍历数据*/
|
||||
data.serviceNumberDataList.forEach((service) => {
|
||||
/** 按车次遍历数据*/
|
||||
var isBackup = true;
|
||||
var opt = { name: '', markPointData: [], data: [] };
|
||||
if (service.tripNumberDataList && service.tripNumberDataList.length) {
|
||||
service.tripNumberDataList.forEach((train, j) => {
|
||||
var pointdata = {};
|
||||
var idx = 0;
|
||||
var lastPoint = null;
|
||||
var nextPoint = null;
|
||||
|
||||
/** 创建标记点名称和坐标*/
|
||||
// pointdata.name = `${service.serviceNumber}${train.directionCode}${train.tripNumber}`;
|
||||
pointdata.name = `${service.serviceNumber}${train.tripNumber}`;
|
||||
pointdata.color = '#000' || lineStyle.color;
|
||||
pointdata.directionCode = train.right ? '2' : '1';
|
||||
if (!store.state.map.mapConfig.upRight) {
|
||||
pointdata.directionCode = train.right ? '1' : '2';
|
||||
}
|
||||
pointdata.coord = [train.stationTimeList[0].secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[0], train.directionCode, false)];
|
||||
|
||||
/** 给服务对象添加服务名称和标记点*/
|
||||
opt.name = '' + service.serviceNumber;
|
||||
opt.markPointData.push(createMartPoint(pointdata));
|
||||
|
||||
/** 计算非折返点车次点坐标集合*/
|
||||
train.stationTimeList.forEach((elem, index) => {
|
||||
idx = index;
|
||||
// ${train.directionCode}
|
||||
const aa = `${train.tripNumber}`;
|
||||
opt.data.push([elem.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, elem, elem.directionCode, false), elem.stationCode, aa]);
|
||||
});
|
||||
|
||||
/** 计算折返点车次坐标点集合*/
|
||||
if (!train.backup && train.reentry && service.tripNumberDataList[j + 1] && service.tripNumberDataList[j + 1].stationTimeList) {
|
||||
lastPoint = train.stationTimeList[idx];
|
||||
nextPoint = service.tripNumberDataList[j + 1].stationTimeList[0];
|
||||
// ${train.directionCode}
|
||||
const aa = `${train.tripNumber}`;
|
||||
opt.data.push([lastPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, lastPoint, train.directionCode, true), lastPoint.stationCode, aa, '折返轨']);
|
||||
opt.data.push([nextPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, lastPoint, train.directionCode, true), lastPoint.stationCode, aa, '折返轨']);
|
||||
}
|
||||
|
||||
/** 如果是备用车,按车次添加线*/
|
||||
if (train.backup) {
|
||||
/** 创建一条完成的服务数据*/
|
||||
opt.name += j;
|
||||
// var model = createSeriesModel(opt, Object.assign({ color: hexColor.toCreate() }, lineStyle));
|
||||
var model = createSeriesModel(opt, Object.assign({ color: '#000' }, lineStyle));
|
||||
if (model) {
|
||||
models.push(model);
|
||||
opt = { name: '', markPointData: [], data: [] };
|
||||
}
|
||||
}
|
||||
|
||||
isBackup = train.backup;
|
||||
});
|
||||
|
||||
// 不是备用车,按服务添加线
|
||||
if (!isBackup) {
|
||||
/** 创建一条完成的服务数据*/
|
||||
// var model = createSeriesModel(opt, Object.assign({ color: hexColor.toCreate() }, lineStyle));
|
||||
var model = createSeriesModel(opt, Object.assign({ color: '#000' }, lineStyle));
|
||||
if (model) {
|
||||
models.push(model);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
return models;
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
|
||||
/** 更新数据并解析成图表*/
|
||||
updateDataToModels(data, stations, kmRangeCoordMap, runPlanData, series, lineStyle) {
|
||||
if (data && data.length) {
|
||||
data.forEach(elem => {
|
||||
/** 判断此条记录的服务号是否存在*/
|
||||
if (!runPlanData[elem.serviceNumber]) {
|
||||
/** 创建一个新服务号标记*/
|
||||
runPlanData[elem.serviceNumber] = {};
|
||||
|
||||
/** 不存在此服务号,则需要创建一条新的line*/
|
||||
series.push(createSeriesModel({
|
||||
zlevel: 1,
|
||||
name: `run${elem.serviceNumber}`,
|
||||
data: [],
|
||||
markPointData: []
|
||||
}, Object.assign({ color: hexColor.toCreate() }, lineStyle)));
|
||||
}
|
||||
|
||||
/** 添加数据*/
|
||||
series.forEach(serie => {
|
||||
/** 找到服务号所在图数据的位置*/
|
||||
if (serie.name == `run${elem.serviceNumber}`) {
|
||||
/** 添加车组号记录标记*/
|
||||
if (!runPlanData[elem.serviceNumber][elem.tripNumber]) {
|
||||
runPlanData[elem.serviceNumber][elem.tripNumber] = [];
|
||||
}
|
||||
|
||||
runPlanData[elem.serviceNumber][elem.tripNumber].push(elem);
|
||||
runPlanData[elem.serviceNumber][elem.tripNumber].sort((a, b) => {
|
||||
return parseInt(a.secondTime) - parseInt(b.secondTime);
|
||||
});
|
||||
|
||||
/** 如果此记录车组号的数据为第一条时,则打上标签*/
|
||||
if (runPlanData[elem.serviceNumber][elem.tripNumber].length <= 1) {
|
||||
const result = serie.markPoint.data.some(ele => ele.name == `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`);
|
||||
if (!result) {
|
||||
let directionCode = elem.right ? '2' : '1';
|
||||
if (!store.state.map.mapConfig.upRight) {
|
||||
directionCode = elem.right ? '1' : '2';
|
||||
}
|
||||
serie.markPoint.data.push(createMartPoint({
|
||||
directionCode: directionCode,
|
||||
coord: [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem)],
|
||||
name: `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`,
|
||||
color: lineStyle.color || '#000'
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
/** 计算折返点*/
|
||||
var nextPoint = [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem), elem.directionCode];
|
||||
if (serie.data.length > 0) {
|
||||
var lastPoint = serie.data[serie.data.length - 1];
|
||||
if (lastPoint[2] !== nextPoint[2]) {
|
||||
serie.data.push([lastPoint[0], this.getYvalueByDirectionCode(lastPoint[1], lastPoint[2]), lastPoint[2]]);
|
||||
serie.data.push([nextPoint[0], this.getYvalueByDirectionCode(nextPoint[1], lastPoint[2]), lastPoint[2]]);
|
||||
}
|
||||
}
|
||||
|
||||
/** 添加车组号数据到对应的服务图数据中*/
|
||||
serie.data.push(nextPoint);
|
||||
/** 保证原始数据排序*/
|
||||
serie.data.sort((a, b) => {
|
||||
return parseInt(a[0]) - parseInt(b[0]);
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
return series;
|
||||
},
|
||||
|
||||
getYaxisValueByStation(station, index) {
|
||||
return this.EdgeHeight + index * this.CoordMultiple;
|
||||
},
|
||||
|
||||
/** 将后台数据转换为试图序列模型*/
|
||||
convertStationsToMap(stations) {
|
||||
var map = {};
|
||||
if (stations && stations.length) {
|
||||
stations.forEach((elem, index) => {
|
||||
map[`${elem.kmRange}`] = this.getYaxisValueByStation(elem, index);
|
||||
});
|
||||
}
|
||||
|
||||
return map;
|
||||
},
|
||||
/** 初始化Y轴*/
|
||||
initializeYaxis(stations) {
|
||||
return createMarkLineModels(stations, (elem, index) => {
|
||||
return this.EdgeHeight + index * this.CoordMultiple;
|
||||
});
|
||||
},
|
||||
|
||||
/** 计算y轴最小值*/
|
||||
computedYaxisMinValue() {
|
||||
return 0;
|
||||
},
|
||||
|
||||
/** 计算y轴最大值*/
|
||||
computedYaxisMaxValue(stations) {
|
||||
return this.EdgeHeight * 2 + (stations.length - 1) * this.CoordMultiple;
|
||||
},
|
||||
|
||||
/** 格式化y轴数据*/
|
||||
computedFormatYAxis(stations, params) {
|
||||
var yText = '0m';
|
||||
var index = Math.floor((parseInt(params.value) - this.EdgeHeight) / this.CoordMultiple);
|
||||
if (index >= 0 && index < stations.length) {
|
||||
yText = Math.floor(stations[index].kmRange) + 'm';
|
||||
}
|
||||
return yText;
|
||||
},
|
||||
|
||||
/** 根据方向计算y折返偏移量*/
|
||||
getYvalueByDirectionCode(defaultVlue, directionCode) {
|
||||
if (directionCode === '1') {
|
||||
defaultVlue -= this.EdgeHeight / 2;
|
||||
} else if (directionCode === '2') {
|
||||
defaultVlue += this.EdgeHeight / 2;
|
||||
}
|
||||
|
||||
return defaultVlue;
|
||||
},
|
||||
|
||||
/** 根据elem计算y值*/
|
||||
getCoordYByElem(stations, kmRangeCoordMap, elem, directionCode, isSpecial) {
|
||||
var defaultVlue = 0;
|
||||
var station = stations.find(it => { return it.code == elem.stationCode; });
|
||||
if (station) {
|
||||
defaultVlue = kmRangeCoordMap[`${station.kmRange}`];
|
||||
if (isSpecial) {
|
||||
defaultVlue = this.getYvalueByDirectionCode(defaultVlue, directionCode);
|
||||
}
|
||||
}
|
||||
|
||||
return defaultVlue;
|
||||
}
|
||||
};
|
@ -11,7 +11,7 @@ import App from './App';
|
||||
import VueI18n from 'vue-i18n';
|
||||
|
||||
import store from './store/index';
|
||||
import router from './router/index_APP_TARGET';
|
||||
import router from './router/index';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState.js';
|
||||
Vue.mixin(CancelMouseState);
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import Vue from 'vue';
|
||||
import store from '@/store/index';
|
||||
import router from './router/index_APP_TARGET';
|
||||
import router from './router/index';
|
||||
import {loginInfo} from '@/scripts/ProjectConfig';
|
||||
import NProgress from 'nprogress';
|
||||
import 'nprogress/nprogress.css';
|
||||
|
@ -124,7 +124,6 @@ const UserRules = () => import('@/views/orderauthor/rules/index');
|
||||
const UserRulesDetail = () => import('@/views/orderauthor/rules/detail');
|
||||
|
||||
const DeviceManage = () => import('@/views/system/deviceManage/index');
|
||||
const StudentManage = () => import('@/views/studentManage');
|
||||
const BankManage = () => import('@/views/competitionManage/bankList/index');
|
||||
|
||||
const Scene = () => import('@/views/drts/scene/index');
|
||||
@ -1088,26 +1087,6 @@ export const asyncRouter = [
|
||||
/* merge 是否再路由处理中与asyncRouter进行合并 mergeIndex合并进入asyncRouter【mergeIndex】 慎重调整asyncRouter顺序 */
|
||||
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
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{ // 系统管理
|
||||
path: '/system',
|
||||
component: Layout,
|
@ -1,742 +0,0 @@
|
||||
import Vue from 'vue';
|
||||
import VueRouter from 'vue-router';
|
||||
// import VueRouter from 'vue-router';
|
||||
|
||||
Vue.use(VueRouter);
|
||||
|
||||
/* Layout */
|
||||
const Layout = () => import('@/layout');
|
||||
// const Login = () => import('@/views/login/hydLogin');
|
||||
const Login = () => import('@/views/login/index');
|
||||
|
||||
const Jlmap3dedit = () => import('@/views/jlmap3d/edit/jlmap3dedit');
|
||||
const Jlmap3d = () => import('@/views/jlmap3d/drive/jl3ddrive');
|
||||
const Jlmap3dSandbox = () => import('@/views/jlmap3d/simulation/jl3dsimulation');
|
||||
const Jlmap3dModel = () => import('@/views/jlmap3d/device/jl3ddevice');
|
||||
const Jlmap3dPassFlow = () => import('@/views/jlmap3d/passflow/jl3dpassflow');
|
||||
const DisplayNew = () => import('@/views/newMap/displayNew/index');
|
||||
|
||||
const JointTrainingNew = () => import('@/views/newMap/jointTrainingNew/index');
|
||||
|
||||
const Errpr404 = () => import('@/views/error-page/404');
|
||||
|
||||
const Dictionary = () => import('@/views/system/dictionary/index');
|
||||
const DictionaryDetail = () => import('@/views/system/dictionaryDetail/index');
|
||||
const UserControl = () => import('@/views/system/userControl/index');
|
||||
const UserTraining = () => import('@/views/system/userTraining/index');
|
||||
const UserExam = () => import('@/views/system/userExam/index');
|
||||
const UserSimulation = () => import('@/views/system/userSimulation/index');
|
||||
const ExistingSimulation = () => import('@/views/system/existingSimulation/index');
|
||||
const CacheControl = () => import('@/views/system/cacheControl/index');
|
||||
const SystemGenerate = () => import('@/views/system/systemGenerate/index');
|
||||
const News = () => import('@/views/system/news/index');
|
||||
const CommandDictionary = () => import('@/views/system/commandDictionary/index');
|
||||
const CommandDictionaryDetail = () => import('@/views/system/commandDictionary/edit');
|
||||
const configLine = () => import('@/views/system/configLine/index');
|
||||
|
||||
const IscsSystem = () => import('@/views/iscs/iscsSystem/index');
|
||||
const IscsConfig = () => import('@/views/iscs/iscsSystem/config/index');
|
||||
|
||||
const Taskmanage = () => import('@/views/lesson/taskmanage/list');
|
||||
const TrainingRuleList = () => import('@/views/lesson/trainingRule/list');
|
||||
const TrainingRuleEdit = () => import('@/views/lesson/trainingRule/detail/index');
|
||||
const Trainingmanage = () => import('@/views/lesson/trainingmanage/index');
|
||||
const LessonEdit = () => import('@/views/lesson/lessoncategory/index');
|
||||
const LessonHome = () => import('@/views/lesson/home');
|
||||
const LessonDetail = () => import('@/views/lesson/details');
|
||||
const BigScreen = () => import('@/views/designPlatform/bigScreen');
|
||||
const BigSplitScreen = () => import('@/views/designPlatform/bigSplitScreen');
|
||||
const TestRunplan = () => import('@/views/designPlatform/testRunplan');
|
||||
|
||||
const ScriptmanageHome = () => import('@/views/scriptManage/home');
|
||||
|
||||
const IbpHome = () => import('@/views/ibp/home');
|
||||
const IbpDraw = () => import('@/views/ibp/ibpDraw/index');
|
||||
|
||||
const TeachDetail = () => import('@/views/teach/detail/index');
|
||||
const TeachHome = () => import('@/views/teach/index');
|
||||
const Pay = () => import('@/views/components/pay/index');
|
||||
|
||||
const ExamHome = () => import('@/views/exam/index');
|
||||
const ExamResult = () => import('@/views/exam/result');
|
||||
const ExamDetail = () => import('@/views/exam/detail/examDetail');
|
||||
const ExamCourseDetail = () => import('@/views/exam/detail/courseDetail');
|
||||
|
||||
const DemonstrationDetail = () => import('@/views/demonstration/detail/index');
|
||||
|
||||
const PlanMonitorEditTool = () => import('@/views/planMonitor/editTool/index');
|
||||
const PlanMonitorNewEditTool = () => import('@/views/planMonitor/newEditTool/index');
|
||||
const PlanMonitorDetail = () => import('@/views/planMonitor/detail');
|
||||
|
||||
const DesignPlatformHome = () => import('@/views/designPlatform/home');
|
||||
const DesignPlatform = () => import('@/views/designPlatform/index');
|
||||
const MapPreviewNew = () => import('@/views/designPlatform/mapPreviewNew');
|
||||
|
||||
const Package = () => import('@/views/package/index');
|
||||
|
||||
const PublishMap = () => import('@/views/publish/publishMap/index');
|
||||
const PublishMapDetail = () => import('@/views/publish/publishMap/list'); // 发布历史
|
||||
const PublishLesson = () => import('@/views/publish/publishLesson/index');
|
||||
const RunPlanTemplate = () => import('@/views/publish/runPlanTemplate/index');
|
||||
const RunPlanCommon = () => import('@/views/publish/runPlanCommon/index');
|
||||
const RunPlanCommonDraft = () => import('@/views/publish/runPlanCommon/draft');
|
||||
const RunPlanEveryDay = () => import('@/views/publish/runPlanEveryDay/index');
|
||||
const RunplanView = () => import('@/views/publish/runPlanEveryDay/runPlanView');
|
||||
const PublishExamRule = () => import('@/views/publish/examRule/index');
|
||||
const PublishExamRuleDraft = () => import('@/views/publish/examRule/draft/index');
|
||||
|
||||
const TrainingPlatform = () => import('@/views/trainingPlatform/index');
|
||||
|
||||
const Commodity = () => import('@/views/orderauthor/commodity/index');
|
||||
const OrderList = () => import('@/views/orderauthor/order/list');
|
||||
const OrderDraft = () => import('@/views/orderauthor/order/draft');
|
||||
const Author = () => import('@/views/orderauthor/author/index');
|
||||
const Permission = () => import('@/views/orderauthor/permission/index');
|
||||
const PermissionDetail = () => import('@/views/orderauthor/permission/detail');
|
||||
const PermissionCreate = () => import('@/views/orderauthor/permission/create/index');
|
||||
const UserRules = () => import('@/views/orderauthor/rules/index');
|
||||
const UserRulesDetail = () => import('@/views/orderauthor/rules/detail');
|
||||
|
||||
const DeviceManage = () => import('@/views/system/deviceManage/index');
|
||||
const Approval = () => import('@/views/approval/index');
|
||||
|
||||
// import { loginInfo } from '@/scripts/ProjectConfig';
|
||||
// import { getSessionStorage } from '@/utils/auth';
|
||||
|
||||
/**
|
||||
* Note: sub-menu only appear when route children.length >= 1
|
||||
* Detail see: https://panjiachen.github.io/vue-element-admin-site/guide/essentials/router-and-nav.html
|
||||
*
|
||||
* hidden: true if set true, item will not show in the sidebar(default is false)
|
||||
* alwaysShow: true if set true, will always show the root menu
|
||||
* if not set alwaysShow, when item has more than one children route,
|
||||
* it will becomes nested mode, otherwise not show the root menu
|
||||
* redirect: noRedirect if set noRedirect will no redirect in the breadcrumb
|
||||
* name:'router-name' the name is used by <keep-alive> (must set!!!)
|
||||
* meta : {
|
||||
roles: ['admin','editor'] control the page roles (you can set multiple roles)
|
||||
title: 'title' the name show in sidebar and breadcrumb (recommend set)
|
||||
icon: 'svg-name' the icon show in the sidebar
|
||||
breadcrumb: false if set false, the item will hidden in breadcrumb(default is true)
|
||||
activeMenu: '/example/list' if set path, the sidebar will highlight the path you set
|
||||
}
|
||||
*/
|
||||
|
||||
export const user = '01'; // 普通用户
|
||||
export const mapCreater = '02'; // 地图创建权限
|
||||
export const lessonCreater = '03'; // 课程创建权限
|
||||
export const admin = '04'; // 管理员
|
||||
export const superAdmin = '05'; // 超级管理员
|
||||
|
||||
export const projectTrain = '011'; // 城市轨道项目
|
||||
export const projectXian = '012'; // 西安地铁项目
|
||||
export const projectXty = '013'; // 西铁院
|
||||
export const projectGzzb = '014'; // 贵州装备
|
||||
export const projectJsxt = '015'; // 竞赛系统
|
||||
export const projectJyd = '017'; // 竞业达
|
||||
export const projectTky = '018'; // 铁科院
|
||||
export const projectHeb = '019'; // 哈盈达
|
||||
|
||||
export const userTrainingPlatform = '016'; // 实训系统
|
||||
// export const refereePlatform = '017'; // 裁判系统
|
||||
|
||||
/**
|
||||
* constantRoutes
|
||||
* a base page that does not have permission requirements
|
||||
* all roles can be accessed
|
||||
*/
|
||||
export const constantRoutes = [
|
||||
// 实训平台登录
|
||||
{
|
||||
path: '/login',
|
||||
component: Login,
|
||||
hidden: true
|
||||
},
|
||||
// 设计平台登录
|
||||
{
|
||||
path: '/design',
|
||||
redirect: '/design/login',
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/design/login',
|
||||
component: Login,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/design/jlmap3d/edit',
|
||||
component: Jlmap3dedit,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/jlmap3d/sandbox',
|
||||
component: Jlmap3dSandbox,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/jlmap3d/devicemodel',
|
||||
component: Jlmap3dModel,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/jlmap3d/passengerflow',
|
||||
component: Jlmap3dPassFlow,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/404',
|
||||
component: Errpr404,
|
||||
hidden: true
|
||||
},
|
||||
{ path: '*', redirect: '/404', hidden: true }
|
||||
];
|
||||
// 公共路由不需要过滤 直接可以访问
|
||||
export const publicAsyncRoute = [
|
||||
{
|
||||
path: '/displayNew/:mode',
|
||||
component: DisplayNew,
|
||||
hidden: true
|
||||
},
|
||||
{ // 剧本编辑 战场图
|
||||
path: '/scriptDisplayNew/:mode',
|
||||
component: DisplayNew,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/jointTrainingNew',
|
||||
component: JointTrainingNew,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/displayBigScreen/:mapId',
|
||||
component: BigScreen,
|
||||
hidden: true
|
||||
},
|
||||
{ // 大屏切分
|
||||
path: '/bigSplitScreen/:mapId',
|
||||
component: BigSplitScreen,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/jlmap3d',
|
||||
component: Jlmap3d,
|
||||
hidden: true
|
||||
},
|
||||
{ // 运行图编辑
|
||||
path: '/plan/tool',
|
||||
component: PlanMonitorEditTool,
|
||||
hidden: true
|
||||
},
|
||||
{ // 哈尔滨运行图编辑
|
||||
path: '/plan/newTool',
|
||||
component: PlanMonitorNewEditTool,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/displayIscs/system',
|
||||
component: IscsSystem,
|
||||
hidden: true,
|
||||
children: [
|
||||
{
|
||||
path: 'config/:mode',
|
||||
component: IscsConfig,
|
||||
hidden: true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/device/teachDetail',
|
||||
component: TeachDetail,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/device/course',
|
||||
component: ExamCourseDetail,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/device/examRule/manage',
|
||||
component: PublishExamRule,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/device/examRule/draft/:mode/:ruleId/:lessonId',
|
||||
component: PublishExamRuleDraft,
|
||||
hidden: true
|
||||
},
|
||||
{ // 试卷详情
|
||||
path: '/device/exam/:examId',
|
||||
component: ExamDetail,
|
||||
hidden: true
|
||||
},
|
||||
{ // 考试结果
|
||||
path: '/device/result/:userExamId',
|
||||
component: ExamResult,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
// 运行图测试(仿真,仅有按计划行车和初始化操作)
|
||||
path: '/design/runPlan/testRunplan',
|
||||
component: TestRunplan,
|
||||
hidden: true
|
||||
}
|
||||
];
|
||||
export const asyncRouter = [
|
||||
{ // 公共地图
|
||||
path: '/design',
|
||||
component: Layout,
|
||||
redirect: '/design/home',
|
||||
meta: {
|
||||
roles: [admin, user]
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
redirect: '/design/home',
|
||||
component: DesignPlatform,
|
||||
meta: {
|
||||
i18n: 'router.designhomePage',
|
||||
icon: 'design'
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'home',
|
||||
component: DesignPlatformHome,
|
||||
meta: {
|
||||
}
|
||||
},
|
||||
{ // 运行图设计
|
||||
path: 'runPlan/detail/:mapId',
|
||||
component: PlanMonitorDetail,
|
||||
hidden: true
|
||||
},
|
||||
{ // 剧本
|
||||
path: 'script/home/:mapId',
|
||||
component: ScriptmanageHome,
|
||||
meta: {
|
||||
i18n: 'router.scriptManage'
|
||||
},
|
||||
hidden: true
|
||||
},
|
||||
{ // 课程列表
|
||||
path: 'lesson/home/:mapId',
|
||||
component: LessonHome,
|
||||
hidden: true
|
||||
},
|
||||
{ // 操作定义
|
||||
path: 'lesson/trainingRule',
|
||||
component: TrainingRuleList,
|
||||
hidden: true
|
||||
},
|
||||
{ // 操作定义步骤
|
||||
path: 'lesson/trainingRule/detail',
|
||||
hidden: true,
|
||||
component: TrainingRuleEdit
|
||||
},
|
||||
{ // 任务管理
|
||||
path: 'lesson/taskManage',
|
||||
component: Taskmanage,
|
||||
hidden: true
|
||||
},
|
||||
{ // 实训管理
|
||||
path: 'lesson/trainingManage',
|
||||
component: Trainingmanage,
|
||||
hidden: true
|
||||
},
|
||||
{ // 创建课程
|
||||
path: 'lesson/edit/:type',
|
||||
component: LessonEdit,
|
||||
hidden: true
|
||||
},
|
||||
{ // 课程详情
|
||||
path: 'lesson/details',
|
||||
component: LessonDetail,
|
||||
hidden: true,
|
||||
children: [
|
||||
{
|
||||
path: 'edit/:type',
|
||||
component: LessonEdit,
|
||||
hidden: true
|
||||
}
|
||||
]
|
||||
},
|
||||
{ // 新版地图预览
|
||||
path: 'mapPreviewNew/:mapId',
|
||||
component: MapPreviewNew,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'bigScreen/:mapId',
|
||||
component: BigScreen,
|
||||
hidden: true
|
||||
},
|
||||
{ // ibp列表
|
||||
path: 'ibp/home/:mapId',
|
||||
component: IbpHome,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'ibp/edit',
|
||||
component: IbpDraw,
|
||||
hidden: true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{ // 实训平台
|
||||
path: '/trainingPlatform',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
meta: {
|
||||
roles: [admin, user, userTrainingPlatform]
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
component: TrainingPlatform,
|
||||
meta: {
|
||||
},
|
||||
children: [
|
||||
{ // 仿真详情
|
||||
path: 'detail/:subSystem',
|
||||
component: DemonstrationDetail,
|
||||
hidden: true
|
||||
},
|
||||
{ // 教学系统 课程列表
|
||||
path: 'teachHome/:subSystem',
|
||||
component: TeachHome,
|
||||
hidden: true
|
||||
},
|
||||
{ // 课程详情
|
||||
path: 'teach/:subSystem',
|
||||
component: TeachDetail,
|
||||
hidden: true
|
||||
},
|
||||
{ // 试卷列表
|
||||
path: 'course/:subSystem',
|
||||
component: ExamCourseDetail,
|
||||
hidden: true
|
||||
},
|
||||
{ // 考试系统 课程列表
|
||||
path: 'examHome/:subSystem',
|
||||
component: ExamHome,
|
||||
hidden: true
|
||||
},
|
||||
{ // 试卷详情
|
||||
path: 'exam/:examId',
|
||||
component: ExamDetail,
|
||||
hidden: true
|
||||
},
|
||||
{ // 试卷列表
|
||||
path: 'examRule/manage',
|
||||
component: PublishExamRule,
|
||||
hidden: true
|
||||
},
|
||||
{ // 创建试卷
|
||||
path: 'examRule/draft/:mode/:ruleId/:lessonId',
|
||||
component: PublishExamRuleDraft,
|
||||
hidden: true
|
||||
},
|
||||
{ // 购买
|
||||
path: 'pay/:lessonId',
|
||||
component: Pay,
|
||||
hidden: true
|
||||
},
|
||||
{ // 考试结果
|
||||
path: 'result/:userExamId',
|
||||
component: ExamResult,
|
||||
hidden: true
|
||||
},
|
||||
{ // 线路权限列表
|
||||
path: 'permission/:mapId',
|
||||
component: Package,
|
||||
hidden: true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{ // 发布内容管理
|
||||
path: '/publish',
|
||||
component: Layout,
|
||||
meta: {
|
||||
i18n: 'router.pulishManage',
|
||||
roles: [admin]
|
||||
},
|
||||
children: [
|
||||
{ // 发布地图
|
||||
path: 'map',
|
||||
component: PublishMap,
|
||||
meta: {
|
||||
i18n: 'router.publishMapManage'
|
||||
}
|
||||
},
|
||||
{ // 发布历史
|
||||
path: 'map/detail',
|
||||
hidden: true,
|
||||
component: PublishMapDetail
|
||||
},
|
||||
{ // 发布课程
|
||||
path: 'lesson',
|
||||
component: PublishLesson,
|
||||
meta: {
|
||||
i18n: 'router.publishLessonManage'
|
||||
}
|
||||
},
|
||||
{ // 模板运行图
|
||||
path: 'runPlan/template',
|
||||
component: RunPlanTemplate,
|
||||
meta: {
|
||||
i18n: 'router.runPlanTemplateManage'
|
||||
}
|
||||
},
|
||||
{ // 加载运行图管理
|
||||
path: 'runPlan/common',
|
||||
component: RunPlanCommon,
|
||||
meta: {
|
||||
i18n: 'router.runPlanCommonManage'
|
||||
}
|
||||
},
|
||||
{ // 新增加载运行图
|
||||
path: 'runPlan/common/:mode',
|
||||
component: RunPlanCommonDraft,
|
||||
hidden: true
|
||||
},
|
||||
{ // 运行图预览
|
||||
path: 'runPlan/view/:mode',
|
||||
component: RunplanView,
|
||||
hidden: true
|
||||
},
|
||||
{ // 每日运行图
|
||||
path: 'runPlan/everyDay',
|
||||
component: RunPlanEveryDay,
|
||||
meta: {
|
||||
i18n: 'router.runPlanEveryDayManage'
|
||||
}
|
||||
},
|
||||
{ // 考试规则列表
|
||||
path: 'examRule/manage',
|
||||
component: PublishExamRule,
|
||||
meta: {
|
||||
i18n: 'router.examRuleManage'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'examRule/draft/:mode/:ruleId/:lessonId',
|
||||
component: PublishExamRuleDraft,
|
||||
hidden: true
|
||||
}
|
||||
]
|
||||
},
|
||||
{ // 订单权限管理
|
||||
path: '/orderauthor',
|
||||
component: Layout,
|
||||
meta: {
|
||||
i18n: 'router.orderAuthorityManage',
|
||||
roles: [admin]
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'author/manage',
|
||||
component: Author,
|
||||
meta: {
|
||||
i18n: 'router.authorityManage'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'commodity/manage',
|
||||
component: Commodity,
|
||||
meta: {
|
||||
i18n: 'router.commodityManage'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'order/manage',
|
||||
component: OrderList,
|
||||
meta: {
|
||||
i18n: 'router.orderManage'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'transfer/manage',
|
||||
component: Permission,
|
||||
meta: {
|
||||
i18n: 'router.authorityTransferManage'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'rules/manage',
|
||||
component: UserRules,
|
||||
meta: {
|
||||
i18n: 'router.userRulesManage'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'rules/manage/detail/:id',
|
||||
hidden: true,
|
||||
component: UserRulesDetail,
|
||||
meta: {
|
||||
i18n: 'router.userRulesManage'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'order/draft/:mode/:orderId',
|
||||
hidden: true,
|
||||
component: OrderDraft,
|
||||
meta: {
|
||||
i18n: 'router.addOrder'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'transfer/detail/:permissionId',
|
||||
component: PermissionDetail,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'transfer/create',
|
||||
component: PermissionCreate,
|
||||
hidden: true
|
||||
}
|
||||
]
|
||||
},
|
||||
{ // 系统管理
|
||||
path: '/system',
|
||||
component: Layout,
|
||||
meta: {
|
||||
i18n: 'router.systemManage',
|
||||
roles: [admin]
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'dictionary',
|
||||
component: Dictionary,
|
||||
meta: {
|
||||
i18n: 'router.dataDictionary'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'dictionary/detail',
|
||||
hidden: true,
|
||||
component: DictionaryDetail,
|
||||
meta: {
|
||||
i18n: 'router.dataDictionaryDetails'
|
||||
}
|
||||
},
|
||||
{
|
||||
// 用户管理
|
||||
path: 'userManage',
|
||||
component: UserControl,
|
||||
meta: {
|
||||
i18n: 'router.userManage'
|
||||
}
|
||||
},
|
||||
{
|
||||
// 缓存管理
|
||||
path: 'cache',
|
||||
component: CacheControl,
|
||||
meta: {
|
||||
i18n: 'router.cacheManage'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'userTrainingManage',
|
||||
component: UserTraining,
|
||||
meta: {
|
||||
i18n: 'router.userTrainingManage'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'userExamManage',
|
||||
component: UserExam,
|
||||
meta: {
|
||||
i18n: 'router.userExamManage'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'userSimulationManage',
|
||||
component: UserSimulation,
|
||||
meta: {
|
||||
i18n: 'router.userSimulationManage'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'existingSimulation',
|
||||
component: ExistingSimulation,
|
||||
meta: {
|
||||
i18n: 'router.existingSimulation'
|
||||
}
|
||||
},
|
||||
{
|
||||
// 子系统生成
|
||||
path: 'systemGenerate',
|
||||
component: SystemGenerate,
|
||||
meta: {
|
||||
i18n: 'router.subsystemGeneration'
|
||||
}
|
||||
},
|
||||
{ // 消息公告
|
||||
path: 'news',
|
||||
component: News,
|
||||
meta: {
|
||||
i18n: 'router.newsBulletin'
|
||||
}
|
||||
},
|
||||
{ // 命令管理
|
||||
path: 'commands',
|
||||
component: CommandDictionary,
|
||||
meta: {
|
||||
i18n: 'router.commandDictionary'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'commands/Detail',
|
||||
hidden: true,
|
||||
component: CommandDictionaryDetail
|
||||
},
|
||||
{ // 线路管理
|
||||
path: 'configLine',
|
||||
component: configLine,
|
||||
meta: {
|
||||
i18n: 'router.configLine'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'deviceManage',
|
||||
component: DeviceManage,
|
||||
meta: {
|
||||
i18n: 'router.deviceManage'
|
||||
}
|
||||
},
|
||||
{// 发布申请
|
||||
path: 'approval',
|
||||
component: Approval,
|
||||
meta: {
|
||||
i18n: 'router.releaseApplication'
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
const createRouter = () => new VueRouter({
|
||||
mode: 'history', // require service support
|
||||
scrollBehavior: () => ({ y: 0 }),
|
||||
routes: constantRoutes
|
||||
});
|
||||
|
||||
const router = createRouter();
|
||||
|
||||
// router.beforeEach((to, from, next) => {
|
||||
// const project = getSessionStorage('project');
|
||||
// document.title = loginInfo[project || 'login'].title;
|
||||
// next();
|
||||
// });
|
||||
|
||||
// 兼容 vue-router在3.1.0版本以上的路由跳转使用的是 promise 的方式
|
||||
const originalPush = VueRouter.prototype.push;
|
||||
VueRouter.prototype.push = function push(location) {
|
||||
return originalPush.call(this, location).catch(err => err);
|
||||
};
|
||||
|
||||
export default router;
|
@ -505,3 +505,9 @@ export const ProjectList = [
|
||||
{value: 'urtss', label: '陪标项目'},
|
||||
{value: 'sdy', label: '苏电院'}
|
||||
];
|
||||
export const localPackageProject = {
|
||||
localdesign: 'designheb',
|
||||
locallogin: 'heb',
|
||||
ntyldesign: 'designntyl',
|
||||
ntyllogin: 'ntyl'
|
||||
};
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { sendCommandNew } from '@/api/jmap/training';
|
||||
import router from '@/router/index_APP_TARGET';
|
||||
import router from '@/router/index';
|
||||
import Command from './Command';
|
||||
import Handler from './Handler';
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import store from '@/store/index';
|
||||
import router from '@/router/index_APP_TARGET';
|
||||
import router from '@/router/index';
|
||||
import CommandHandler from './CommandHandler.js';
|
||||
import ValidateHandler from './ValidateHandler.js';
|
||||
import { State2SimulationMap } from './Config.js';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { publicAsyncRoute, asyncRouter, constantRoutes, user, projectTrain, projectXian, projectXty, projectGzzb, projectJsxt, projectJyd, projectTky, projectHeb, superAdmin, admin, userTrainingPlatform, JSXT, projectRoute, projectDrts, projectSdy } from '@/router/index_APP_TARGET';
|
||||
import { publicAsyncRoute, asyncRouter, constantRoutes, user, projectTrain, projectXian, projectXty, projectGzzb, projectJsxt, projectJyd, projectTky, projectHeb, superAdmin, admin, userTrainingPlatform, JSXT, projectRoute, projectDrts, projectSdy } from '@/router/index';
|
||||
import { loginInfo } from '@/scripts/ProjectConfig';
|
||||
import { getSessionStorage } from '@/utils/auth';
|
||||
|
||||
|
@ -8,7 +8,7 @@ import { getBaseUrl } from '@/utils/baseUrl';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
import ConstConfig from '@/scripts/ConstConfig';
|
||||
import Vue from 'vue';
|
||||
import router from '../router/index_APP_TARGET';
|
||||
import router from '../router/index';
|
||||
|
||||
const BASE_API = getBaseUrl();
|
||||
|
||||
|
@ -101,9 +101,9 @@ StompClient.prototype = {
|
||||
closeStompDebug() {
|
||||
if (this.clientIns) {
|
||||
if (isDev || isTest) {
|
||||
this.clientIns.debug = function (message) {
|
||||
console.debug(message);
|
||||
};
|
||||
this.clientIns.debug = function (message) { console.debug(message); };
|
||||
} else {
|
||||
this.clientIns.debug = function (message) {};
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -22,7 +22,7 @@
|
||||
<script>
|
||||
import { listPublishMap, getMapListByProjectCode } from '@/api/jmap/map';
|
||||
import { UrlConfig } from '@/scripts/ConstDic';
|
||||
import { superAdmin, admin, lessonCreater } from '@/router/index_APP_TARGET';
|
||||
import { superAdmin, admin, lessonCreater } from '@/router/index';
|
||||
import { getSessionStorage, setSessionStorage, removeSessionStorage } from '@/utils/auth';
|
||||
import FilterCity from '@/views/components/filterCity';
|
||||
import localStore from 'storejs';
|
||||
|
@ -46,7 +46,7 @@
|
||||
<div class="btn-buy">
|
||||
<!-- <el-button v-if="!isLocal" :disabled="disabled" type="success" @click="buy">{{ $t('exam.buy') }}</el-button> -->
|
||||
<el-button v-if="hasPermssion && !isLocal" :disabled="disabled" type="primary" @click="distribute">{{ $t('exam.distributePermission') }}</el-button>
|
||||
<el-button v-if="hasPermssion && !$route.query.noPreLogout" :disabled="disabled" type="primary" @click="checkCourse">{{ $t('exam.viewCoursePapers') }}</el-button>
|
||||
<el-button v-if="hasPermssion && !$route.query.noPreLogout && !courseModel.systemFault" :disabled="disabled" type="primary" @click="checkCourse">{{ $t('exam.viewCoursePapers') }}</el-button>
|
||||
<el-button v-if="!$route.query.noPreLogout" type="primary" :disabled="disabled" @click="backLessonList">{{ $t('exam.returnCourseList') }}</el-button>
|
||||
<el-button v-if="$route.query.noPreLogout" type="primary" :disabled="disabled" @click="quit">退出</el-button>
|
||||
</div>
|
||||
@ -138,7 +138,8 @@ export default {
|
||||
prdType: resp.data.prdType,
|
||||
mapId: resp.data.mapId,
|
||||
PermissionType: PermissionType.EXAM,
|
||||
treeList: resp.data.examDefinitionList
|
||||
treeList: resp.data.examDefinitionList,
|
||||
systemFault: resp.data.systemFault
|
||||
};
|
||||
if (this.hasPermssion) {
|
||||
this.valid = true;
|
||||
|
@ -34,7 +34,7 @@ import { getSubSystemDetail } from '@/api/trainingPlatform';
|
||||
import { UrlConfig } from '@/scripts/ConstDic';
|
||||
import { forceDeleteLesson } from '@/api/jmap/lesson';
|
||||
import { getSessionStorage } from '@/utils/auth';
|
||||
import { lessonCreater } from '@/router/index_APP_TARGET';
|
||||
import { lessonCreater } from '@/router/index';
|
||||
import localStore from 'storejs';
|
||||
|
||||
export default {
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
|
||||
<div style="position: absolute;right:50%;top:50%;z-index:10;background: #EBEBEB;" v-show="tuoguanbutton" @click="tuoguan">{{ tuoguanbuttonmsg }}</div>
|
||||
<div style="position: absolute;right:50%;top:60%;z-index:10;background: #EBEBEB;">
|
||||
<div style="position: absolute;right:50%;top:60%;z-index:10;background: #EBEBEB;" v-show="isTraining" >
|
||||
<el-select v-model="value" :placeholder="initMsg" @change="currentsel" @visible-change="clickselect" >
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
@ -78,6 +78,7 @@ import axios from 'axios';
|
||||
|
||||
data() {
|
||||
return {
|
||||
isTraining:true,
|
||||
localStatic:JL3D_LOCAL_STATIC,
|
||||
options: [],
|
||||
initMsg:"请选择列车",
|
||||
@ -121,6 +122,7 @@ import axios from 'axios';
|
||||
async mounted() {
|
||||
if(this.$route.query.group){
|
||||
getSimulationInfoNew(this.$route.query.group).then(netdata => {
|
||||
|
||||
if(netdata.data.type == "SCRIPT_MAKING"){
|
||||
this.tuoguanbutton = true;
|
||||
}
|
||||
@ -137,6 +139,11 @@ import axios from 'axios';
|
||||
beforeDestroy() {
|
||||
},
|
||||
methods: {
|
||||
changeTrainSelect(mode){
|
||||
if(mode == "isTraining"){
|
||||
this.isTraining = false;
|
||||
}
|
||||
},
|
||||
currentsel(selVal){
|
||||
let oldgroupnum = this.groupnum;
|
||||
this.groupnum = selVal;
|
||||
@ -276,7 +283,7 @@ import axios from 'axios';
|
||||
}
|
||||
},
|
||||
updateDriveValue(newvalue){
|
||||
|
||||
|
||||
if(newvalue != this.value){
|
||||
this.value = newvalue;
|
||||
}
|
||||
|
@ -86,7 +86,7 @@
|
||||
<div id="sg" class="panebutton" style="bottom:6%;left:3%;" @click="sgclink">
|
||||
<img class="buttonimg" :src="sgimg" />
|
||||
<div class="buttontext">{{ $t('jlmap3d.electricGongSheng') }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 受电弓降 -->
|
||||
<div id="jg" class="panebutton" style="bottom:6%;left:17%;" @click="jgclick">
|
||||
<img class="buttonimg" :src="jgimg" />
|
||||
|
@ -90,7 +90,7 @@ export default {
|
||||
backmsg:this.$t('global.back'),
|
||||
// trainnum: '',
|
||||
// stoptimes: '',
|
||||
dcontrolshow: false,
|
||||
dcontrolshow: true,
|
||||
msgshow:false,
|
||||
controlmsg:"不能选择其它列车",
|
||||
|
||||
@ -177,7 +177,7 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
this.mmishow = true;
|
||||
window.datanew = this.datanew;
|
||||
// window.datanew = this.datanew;
|
||||
window.updatestatus = this.updatestatus;
|
||||
|
||||
if(this.$route.query.type == "DRIVE"){
|
||||
@ -207,7 +207,7 @@ export default {
|
||||
// // this.jlmap3d = null;
|
||||
// }
|
||||
// },
|
||||
show: function (skinCode,group,zindex) {
|
||||
show: function (skinCode,group,zindex,isTraining) {
|
||||
// console.log("show");
|
||||
// console.log(skinCode);
|
||||
// console.log(this.jlmap3d);
|
||||
@ -221,8 +221,10 @@ export default {
|
||||
// this.jlmap3d.restart();
|
||||
this.jlmap3d.eventon();
|
||||
this.jlmap3d.animateon();
|
||||
|
||||
}
|
||||
if(isTraining){
|
||||
this.$refs.dcontrol.changeTrainSelect(isTraining);
|
||||
}
|
||||
},
|
||||
init: function (skinCode,group) {
|
||||
const mapdata = this.$store.getters['map/map'];
|
||||
|
@ -4,13 +4,13 @@
|
||||
<div class="jl3dmap3dMaintainerSelect" :style="{'background-image': 'url('+localStatic+'/background/other.jpg)'}">
|
||||
<div class="maintainerSelectButton selectButtonImg1"
|
||||
:style="{'background-image': 'url('+localStatic+'/vrtest/maintainer.png)'}"
|
||||
style="left:10%" @mouseenter="onMouseOverNormal"></div>
|
||||
style="left:40%" @mouseenter="onMouseOverNormal"></div>
|
||||
|
||||
<div class="maintainerSelectButton selectButtonImg2"
|
||||
:style="{'background-image': 'url('+localStatic+'/vrtest/zc.png)'}"
|
||||
style="left:10%;" v-show="normalShow"@mouseleave="onMouseOutNormal" @click="initNormal"></div>
|
||||
style="left:40%;" v-show="normalShow"@mouseleave="onMouseOutNormal" @click="initNormal"></div>
|
||||
|
||||
<div class="maintainerSelectButton selectButtonImg3"
|
||||
<!-- <div class="maintainerSelectButton selectButtonImg3"
|
||||
:style="{'background-image': 'url('+localStatic+'/vrtest/maintainervr.png)'}"
|
||||
style="left:40%;" @mouseenter="onMouseOverVr"></div>
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
|
||||
<div class="maintainerSelectButton selectButtonImg6"
|
||||
:style="{'background-image': 'url('+localStatic+'/vrtest/trvr.png)'}"
|
||||
style="left:70%;" v-show="trainRescueShow" @mouseleave="onMouseOutRescue" @click="initTrainRescueVr"></div>
|
||||
style="left:70%;" v-show="trainRescueShow" @mouseleave="onMouseOutRescue" @click="initTrainRescueVr"></div> -->
|
||||
|
||||
|
||||
</div>
|
||||
|
66
src/views/jlmap3d/trafficplan/component/textui.vue
Normal file
66
src/views/jlmap3d/trafficplan/component/textui.vue
Normal file
@ -0,0 +1,66 @@
|
||||
<template>
|
||||
<div class="textui"
|
||||
:style="{
|
||||
'background-image': 'url('+localStatic+'/texture/showmsg.png)',
|
||||
'top': uiTop,
|
||||
'left': uiLeft,
|
||||
'display': uiDisplay,
|
||||
}">
|
||||
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Vue from 'vue';
|
||||
import { JL3D_LOCAL_STATIC } from '@/api/jlmap3d/assets3d.js';
|
||||
|
||||
export default {
|
||||
name: 'Jl3dTextUi',
|
||||
components: {
|
||||
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
localStatic:JL3D_LOCAL_STATIC,
|
||||
uiDisplay:'none',
|
||||
uiTop:'0px',
|
||||
uiLeft:'0px',
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
|
||||
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
watch: {
|
||||
|
||||
},
|
||||
methods: {
|
||||
updataUi: function (display,pos) {
|
||||
this.uiDisplay = display;
|
||||
if(pos){
|
||||
this.uiTop = (pos.y-210)+'px';
|
||||
this.uiLeft = (pos.x-75) +'px';
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
.textui{
|
||||
position: absolute;
|
||||
|
||||
width:150px;
|
||||
height:300px;
|
||||
z-index: 11;
|
||||
background-repeat:no-repeat;
|
||||
background-size:100%;
|
||||
// display:none;
|
||||
}
|
||||
</style>
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div id="jl3d" class="jl3ddraw">
|
||||
|
||||
<Jl3d-TextUi ref="jl3dtextui" ></Jl3d-TextUi>
|
||||
<canvas id="canvastexture" ></canvas>
|
||||
|
||||
</div>
|
||||
@ -10,11 +10,12 @@
|
||||
import { JL3D_LOCAL_STATIC } from '@/api/jlmap3d/assets3d.js';
|
||||
import { Jl3dSandBoxTest } from '@/jlmap3d/jl3dtrafficplan/jl3dsandboxtest.js';
|
||||
|
||||
import Jl3dTextUi from '@/views/jlmap3d/trafficplan/component/textui';
|
||||
|
||||
export default {
|
||||
name: 'jl3dsandboxtest',
|
||||
components: {
|
||||
|
||||
Jl3dTextUi,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -41,7 +42,7 @@
|
||||
methods: {
|
||||
initnewdata: function (group,header){
|
||||
let dom = document.getElementById('jl3d');
|
||||
this.jl3d = new Jl3dSandBoxTest(dom, this.$route.query.mapid, this.$route.query.group, this.$route.query.token);
|
||||
this.jl3d = new Jl3dSandBoxTest(dom,this.$refs.jl3dtextui, this.$route.query.mapid, this.$route.query.group, this.$route.query.token);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -55,7 +56,7 @@
|
||||
/* left: 0; */
|
||||
width: 50%;
|
||||
height: 50%;
|
||||
z-index: 1500;
|
||||
z-index: 9;
|
||||
}
|
||||
|
||||
#canvastexture {
|
||||
|
@ -68,7 +68,7 @@ export default {
|
||||
{ required: true, message: this.$t('rules.pleaseEnterMapName'), trigger: 'change' }
|
||||
],
|
||||
classIdList: [
|
||||
{ required: !(this.$store.state.user.roles.includes('04') || this.$store.state.user.roles.includes('05')), message: '请选择课程归属班级', trigger: 'change' }
|
||||
{ required: true, message: '请选择课程归属班级', trigger: 'change' }
|
||||
]
|
||||
};
|
||||
},
|
||||
@ -85,7 +85,7 @@ export default {
|
||||
this.editModel = {
|
||||
id: model.id,
|
||||
name: model.name,
|
||||
mapId: this.$route.query.mapId,
|
||||
mapId: this.$route.query.mapId || this.$route.params.mapId,
|
||||
prdType: model.prdType,
|
||||
cityCode: model.cityCode,
|
||||
classIdList: []
|
||||
|
@ -138,7 +138,7 @@ import bgPsdImg from '@/assets/bg_psd.png';
|
||||
import HandRight from '@/assets/hand-o-right.png';
|
||||
import wchat from '@/assets/wchat.png';
|
||||
import { UrlConfig } from '@/scripts/ConstDic';
|
||||
import { loginInfo, ProjectIcon, ProjectLoginStyleList, VersionBaseNoShow, MainBodyNoShow, NoQrcodeList} from '@/scripts/ProjectConfig';
|
||||
import { loginInfo, ProjectIcon, ProjectLoginStyleList, VersionBaseNoShow, MainBodyNoShow, NoQrcodeList, localPackageProject} from '@/scripts/ProjectConfig';
|
||||
import { removeToken, getToken } from '@/utils/auth';
|
||||
import LangStorage from '@/utils/lang';
|
||||
import FloatPart from './floatPart';
|
||||
@ -206,14 +206,8 @@ export default {
|
||||
project() {
|
||||
const project = this.$route.query.project;
|
||||
const split = this.$route.path.split('/')[1];
|
||||
if (process.env.VUE_APP_PRO === 'local' && split == 'design') {
|
||||
return split + 'heb';
|
||||
} else if (process.env.VUE_APP_PRO === 'ntyl' && split == 'design') {
|
||||
return split + 'ntyl';
|
||||
} else if (process.env.VUE_APP_PRO === 'local' && split == 'login') {
|
||||
return 'heb';
|
||||
} else if (process.env.VUE_APP_PRO === 'ntyl' && split == 'login') {
|
||||
return 'ntyl';
|
||||
if (process.env.VUE_APP_PRO) {
|
||||
return localPackageProject[process.env.VUE_APP_PRO + split];
|
||||
} else if (split == 'design') {
|
||||
return project ? split + project : split;
|
||||
} else if (split == 'login') {
|
||||
|
@ -94,7 +94,7 @@ import lick_icon from '@/assets/like.png';
|
||||
import unlike_icon from '@/assets/unlike.png';
|
||||
import reply_icon from '@/assets/reply.png';
|
||||
import delete_icon from '@/assets/delete.png';
|
||||
import { superAdmin } from '@/router/index_APP_TARGET';
|
||||
import { superAdmin } from '@/router/index';
|
||||
import { ProjectCode } from '@/scripts/ProjectConfig';
|
||||
export default {
|
||||
name: 'MessageBoard',
|
||||
|
@ -482,7 +482,7 @@ export default {
|
||||
if (this.$store.state.training.prdType == '04') {
|
||||
this.panelShow = false;
|
||||
this.drivingShow = true;
|
||||
this.$refs.Jl3dDrive.show(this.mapId, this.group, 34);
|
||||
this.$refs.Jl3dDrive.show(this.mapId, this.group, 34,"isTraining");
|
||||
} else {
|
||||
const routeData = this.$router.resolve({
|
||||
path:'/jlmap3d/sandbox',
|
||||
|
@ -20,7 +20,7 @@ import MapPublish from './publish';
|
||||
import MapPublish3d from './publish3d';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { saveMap, getBuildMapExport } from '@/api/jmap/mapdraft';
|
||||
import { superAdmin, admin } from '@/router/index_APP_TARGET';
|
||||
import { superAdmin, admin } from '@/router/index';
|
||||
|
||||
export default {
|
||||
name: 'MapOperateMenu',
|
||||
|
@ -74,6 +74,7 @@
|
||||
:placeholder="item.placeholder"
|
||||
:disabled="item.disabled"
|
||||
:clearable="item.clearable"
|
||||
@change="((val)=>{deviceChange(val, item)})"
|
||||
>
|
||||
<el-option
|
||||
v-for="option in item.options"
|
||||
|
173
src/views/newMap/newMapdraft/mapoperate/cross.vue
Normal file
173
src/views/newMap/newMapdraft/mapoperate/cross.vue
Normal file
@ -0,0 +1,173 @@
|
||||
<template>
|
||||
<el-tabs v-model="activeName" class="card">
|
||||
<el-tab-pane class="view-control" :label="$t('map.property')" name="first" :lazy="lazy">
|
||||
<operate-property
|
||||
ref="dataform"
|
||||
:form="form"
|
||||
:edit-model="editModel"
|
||||
:rules="rules"
|
||||
type="Line"
|
||||
@updateMapModel="updateMapModel"
|
||||
@clearDeviceSelect="clearDeviceSelect"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second" :lazy="lazy">
|
||||
<create-operate
|
||||
ref="createForm"
|
||||
:create-form="createForm"
|
||||
:add-model="addModel"
|
||||
:create-rules="rules"
|
||||
@create="create"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane class="view-control" :label="$t('map.batchOperation')" name="third" :lazy="lazy">
|
||||
<div class="view-content" style="text-align:center;">
|
||||
<el-button type="primary" size="big" style="margin-top:10px" @click="generateCross">{{ $t('map.generateCross') }}</el-button>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</template>
|
||||
<script>
|
||||
import ConstConfig from '@/scripts/ConstConfig';
|
||||
import Cookies from 'js-cookie';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { getUID } from '@/jmapNew/utils/Uid';
|
||||
import OperateProperty from './components/operateProperty';
|
||||
import { deepAssign } from '@/utils/index';
|
||||
import CreateOperate from './components/createOperate';
|
||||
|
||||
export default {
|
||||
name:'CrossDraft',
|
||||
components: {
|
||||
OperateProperty,
|
||||
CreateOperate
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default: function () {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activeName: 'first',
|
||||
lazy: true,
|
||||
field: '',
|
||||
crossList:[],
|
||||
editModel: {
|
||||
code: '',
|
||||
name: '',
|
||||
relateSwitchList: []
|
||||
},
|
||||
addModel:{
|
||||
name: '',
|
||||
relateSwitchList: []
|
||||
},
|
||||
rules: {
|
||||
code: [
|
||||
{ required: true, message: this.$t('rules.pleaseSelectCross'), trigger: 'change' }
|
||||
],
|
||||
name: [
|
||||
{ required: true, message: this.$t('rules.pleaseInputCrossName'), trigger: 'blur' }
|
||||
],
|
||||
relateSwitchList:[
|
||||
{ required: true, message: this.$t('rules.pleaseSelectSwitch'), trigger: 'change' }
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'switchList'
|
||||
// 'crossList'
|
||||
]),
|
||||
form() {
|
||||
const form = {
|
||||
labelWidth: '120px',
|
||||
items: {
|
||||
draw: {
|
||||
name: this.$t('map.drawData'),
|
||||
item: [
|
||||
{ prop: 'code', label: this.$t('map.crossCoding'), type: 'select', optionLabel: 'code', optionValue: 'code',
|
||||
options: this.crossList, deviceChange: this.deviceChange },
|
||||
{ prop: 'name', label: this.$t('map.crossName'), type: 'input' },
|
||||
{ prop: 'relateSwitchList', label: this.$t('map.relateSwitchList'), type: 'multiSelect', optionLabel: 'name&&code',
|
||||
optionValue: 'code', options: this.switchList, disabled:true }
|
||||
]
|
||||
}
|
||||
}
|
||||
};
|
||||
return form;
|
||||
},
|
||||
createForm() {
|
||||
const form = {
|
||||
labelWidth: '120px',
|
||||
items:{
|
||||
all:{
|
||||
name:'',
|
||||
item: [
|
||||
{ prop: 'name', label: this.$t('map.crossName'), type: 'input' },
|
||||
{ prop: 'relateSwitchList', label:this.$t('map.relateSwitchList'), type: 'multiSelectHover',
|
||||
optionLabel: 'name&&code', optionValue: 'code', options: this.switchList, hover: this.hover,
|
||||
buttonType: 'relatedSwitch', buttonShowType: this.relatedSwitchButtonShow, deviceChange: this.changeSwitch }
|
||||
]
|
||||
}
|
||||
}
|
||||
};
|
||||
return form;
|
||||
},
|
||||
relatedSwitchButtonShow() {
|
||||
return this.field === 'relatedSwitch';
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
hover(field) {
|
||||
this.field = field == this.field ? '' : field;
|
||||
if (this.field) {
|
||||
this.$emit('deviceSelect', 'Cross');
|
||||
} else {
|
||||
this.$emit('deviceSelect', '');
|
||||
}
|
||||
},
|
||||
updateMapModel(data) {
|
||||
this.$emit('updateMapModel', data);
|
||||
},
|
||||
clearDeviceSelect() {
|
||||
this.$emit('deviceSelect', '');
|
||||
},
|
||||
create() {
|
||||
},
|
||||
generateCross() {
|
||||
|
||||
},
|
||||
changeSwitch(switchList) {
|
||||
const result = this.judgeRelateSwitch();
|
||||
if (!result) { this.addModel.relateSwitchList.pop(); }
|
||||
},
|
||||
deviceSelect(selected) {
|
||||
if (selected && selected._type.toUpperCase() === 'Station'.toUpperCase() && this.field != 'relatedSwitch') {
|
||||
|
||||
} else if (selected && selected._type.toUpperCase() === 'Switch'.toUpperCase() && this.field == 'relatedSwitch') {
|
||||
this.activeName = 'second';
|
||||
if (!this.addModel.relateSwitchList.includes(selected.code)) {
|
||||
this.judgeRelateSwitch() && this.addModel.relateSwitchList.push(selected.code);
|
||||
}
|
||||
}
|
||||
},
|
||||
judgeRelateSwitch() {
|
||||
if (this.addModel.relateSwitchList.length >= 4) {
|
||||
this.$message.error('关联的道岔不能超过4个');
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
.card {
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
@ -67,6 +67,7 @@ import Arrow from './arrow';
|
||||
import SplitScreen from './splitScreen';
|
||||
import FloodGate from './floodGate';
|
||||
import DirectionRod from './directionRod';
|
||||
import Cross from './cross';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
|
||||
export default {
|
||||
@ -97,7 +98,8 @@ export default {
|
||||
Arrow,
|
||||
SplitScreen,
|
||||
FloodGate,
|
||||
DirectionRod
|
||||
DirectionRod,
|
||||
Cross
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
@ -138,7 +140,8 @@ export default {
|
||||
{label: '站间分隔', name:'SplitStation', menus:SplitStation},
|
||||
{label: '箭头', name:'Arrow', menus:Arrow},
|
||||
{label: '防淹门', name: 'FloodGate', menus: FloodGate},
|
||||
{label: '方向杆', name: 'DirectionRod', menus: DirectionRod}
|
||||
{label: '方向杆', name: 'DirectionRod', menus: DirectionRod},
|
||||
{label: this.$t('map.cross'), name: 'Cross', menus: Cross}
|
||||
],
|
||||
selectDevice:'',
|
||||
enabledTab: 'Section',
|
||||
|
@ -8,7 +8,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { admin } from '@/router/index_APP_TARGET';
|
||||
import { admin } from '@/router/index';
|
||||
import { listPackagePermission, restorePackagePermission, getPackageQrCode, setCommodityStatus } from '@/api/management/distribute';
|
||||
import { UrlConfig } from '@/scripts/ConstDic';
|
||||
import QrCode from '@/components/QrCode';
|
||||
|
@ -400,13 +400,13 @@ export default {
|
||||
}
|
||||
let className = '';
|
||||
this.classList.forEach(item => {
|
||||
if (item.id === this.exportData.classId) {
|
||||
className = item.name;
|
||||
if (item.departmentId === this.exportData.classId) {
|
||||
className = item.departmentName;
|
||||
}
|
||||
});
|
||||
const wb = XLSX.utils.book_new();
|
||||
let cellNum = 0;
|
||||
let data = [{A:'贵 州 装 备 制 造 职 业 学 院'}, {A:'实 训 成 绩 登 记 表'}, {A:`班级:${className} 实训课程名称: 20XX 学年 第 学期 `}];
|
||||
let data = [{A:this.$store.state.user.companyName}, {A:'实 训 成 绩 登 记 表'}, {A:`班级:${className} 实训课程名称: 20XX 学年 第 学期 `}];
|
||||
const data1 = [{A: '序号', B: '姓名', C:'学号', D:'考勤(10分)', E: '技能操作(30分)', F: '', G: '考试成绩(60分)', H: '', I: '期末成绩', J: '备注'}, {E: 'ATS现地(15分)', F: 'ATS行调(15分)', G: 'ATS现地(30分)', H: 'ATS行调(30分)'}];
|
||||
const data2 = [{A: '序号', B: '姓名', C:'学号', D:'考勤(10分)', E: '技能操作(30分)', F: '考试成绩(60分)', G: '期末成绩', H: '备注'}, { E: 'ATS现地(30分)', F: 'ATS现地(60分)'}];
|
||||
const data3 = [{A: '序号', B: '姓名', C:'学号', D:'考勤(10分)', E: '技能操作(30分)', F: '考试成绩(60分)', G: '期末成绩', H: '备注'}, {E: 'ATS行调(30分)', F: 'ATS行调(60分)'}];
|
||||
|
@ -252,8 +252,25 @@ export default {
|
||||
studentData.depart = depart;
|
||||
studentData.parentDepart = parentDepart;
|
||||
for ( let i = 2; i <= dataList[0].length; i++) {
|
||||
if (dataList[2][i] && dataList[1][i]) {
|
||||
const serialNumber = dataList[0][i];
|
||||
const studentId = dataList[1][i];
|
||||
const name = dataList[2][i];
|
||||
const reg = new RegExp('[\\u4E00-\\u9FFF]+', 'g');
|
||||
const studentIdJudge = !!studentId && !reg.test(studentId);
|
||||
const serialNumberJudge = serialNumber == (i - 1);
|
||||
console.log(studentIdJudge, serialNumberJudge);
|
||||
if (studentIdJudge && serialNumberJudge && name) {
|
||||
students.push({account:dataList[1][i], name: dataList[2][i]});
|
||||
} else {
|
||||
if (!serialNumber && !studentId && !name) {
|
||||
break;
|
||||
} else if (!name) {
|
||||
throw new Error(`序号为:《${serialNumber}》,学号为:《${studentId}》的数据学生姓名为空!`);
|
||||
} else if (!studentIdJudge) {
|
||||
throw new Error(`序号为:《${serialNumber}》,学号为:《${studentId}》的数据学号格式不正确!`);
|
||||
} else if (!serialNumberJudge) {
|
||||
throw new Error(`序号为:《${serialNumber}》,学号为:《${studentId}》的数据序号顺序不正确!`);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
<script>
|
||||
import { listUserPermision } from '@/api/management/author';
|
||||
import { superAdmin, admin } from '@/router/index_APP_TARGET';
|
||||
import { superAdmin, admin } from '@/router/index';
|
||||
import selectRole from './selectRole/list';
|
||||
import LangStorage from '@/utils/lang';
|
||||
|
||||
|
@ -1,17 +1,18 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog :title="title" :visible.sync="dialogVisible" width="500px" :before-close="doClose" center>
|
||||
<div style="text-align: center;">
|
||||
<span>生成地图:</span>
|
||||
<el-select v-model="mapId" placeholder="请选择" size="small">
|
||||
<el-option
|
||||
v-for="item in mapList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
<el-form ref="form" :model="form" label-width="100px" :rules="rules">
|
||||
<el-form-item label="生成地图:" prop="mapId">
|
||||
<el-select v-model="form.mapId" placeholder="请选择" size="small">
|
||||
<el-option
|
||||
v-for="item in mapList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" :loading="loading" @click="doCreate">{{ loading? '生成中':$t('global.confirm') }}</el-button>
|
||||
<el-button @click="doClose">{{ $t('global.cancel') }}</el-button>
|
||||
@ -34,8 +35,13 @@ export default {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
title: '一键生成课程和试卷',
|
||||
mapId: '',
|
||||
loading: false
|
||||
form: {mapId: ''},
|
||||
loading: false,
|
||||
rules: {
|
||||
mapId: [
|
||||
{ required: true, message: '请选择生成地图', trigger: 'change' }
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
@ -43,16 +49,20 @@ export default {
|
||||
this.dialogVisible = true;
|
||||
},
|
||||
doCreate() {
|
||||
this.loading = true;
|
||||
aKeyGeneratingLesson([this.mapId]).then(resp => {
|
||||
this.$message.success('生成课程、试卷成功!');
|
||||
this.loading = false;
|
||||
this.dialogVisible = false;
|
||||
this.$emit('reloadTable');
|
||||
}).catch(() => {
|
||||
this.$message.error('生成课程、试卷失败!');
|
||||
this.dialogVisible = false;
|
||||
this.loading = false;
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.loading = true;
|
||||
aKeyGeneratingLesson([this.mapId]).then(resp => {
|
||||
this.$message.success('生成课程、试卷成功!');
|
||||
this.loading = false;
|
||||
this.dialogVisible = false;
|
||||
this.$emit('reloadTable');
|
||||
}).catch(() => {
|
||||
this.$message.error('生成课程、试卷失败!');
|
||||
this.dialogVisible = false;
|
||||
this.loading = false;
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
|
@ -35,7 +35,7 @@ import CopyMap from './copy';
|
||||
import LocalMap from './localMap';
|
||||
import ExportMap from './exportMap';
|
||||
import MapSort from './mapSort';
|
||||
import { superAdmin } from '@/router/index_APP_TARGET';
|
||||
import { superAdmin } from '@/router/index';
|
||||
import { ProjectList } from '@/scripts/ProjectConfig';
|
||||
import { getPermissionQuickly } from '@/api/management/author';
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { superAdmin } from '@/router/index_APP_TARGET';
|
||||
import { superAdmin } from '@/router/index';
|
||||
import { getRunPlanLoadList, listAllTempLateRunPlan, deleteDailyRunPlanLoad, postDailyRunPlanLoadGenerate, postSchedulingCommonGenerate } from '@/api/runplan';
|
||||
import { UrlConfig } from '@/scripts/ConstDic';
|
||||
import CopyMap from './copyMap';
|
||||
|
@ -5,7 +5,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { superAdmin } from '@/router/index_APP_TARGET';
|
||||
import { superAdmin } from '@/router/index';
|
||||
import { getPublishMapListOnline } from '@/api/jmap/map';
|
||||
import { runPlanEveryDayList, deleteRunPlanEveryDay } from '@/api/runplan';
|
||||
import { UrlConfig } from '@/scripts/ConstDic';
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user