Merge remote-tracking branch 'origin/test'

This commit is contained in:
program-walker 2020-06-16 15:17:55 +08:00
commit 6a4ba66b0e
235 changed files with 3029 additions and 5128 deletions

View File

@ -47,7 +47,7 @@ export default {
created() {
const project = getSessionStorage('project');
if (project) {
document.querySelector("link[rel*='icon']").href = ProjectIcon[this.project];
document.querySelector("link[rel*='icon']").href = loginInfo[project].linkIcon || ProjectIcon[project];
}
},
mounted() {

View File

@ -110,3 +110,12 @@ export function getScriptByIdBasic(id) {
method: 'get'
});
}
/** 切换剧本的仿真成员 */
export function changeScriptRole(group, memberId) {
return request({
url: `/api/scriptSimulation/${group}/${memberId}/switch`,
method: 'put'
});
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 260 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 269 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 234 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

@ -9,7 +9,7 @@
<i class="el-icon-arrow-right" />
</div>
<ul v-if="isPopup" ref="popup" class="menu" :style="{display: isShow? 'block': 'table', marginLeft: marginLeft+'px'}">
<div class="menu-pop">
<div class="menu-pop pop-menu">
<div v-show="isShow" class="arrow el-icon-arrow-down" />
<pop-menu-item v-for="(el, i) in option.children" :key="i" :option="el" :pop-class="popClass" @close="close" />
<div v-show="isShow" class="arrow el-icon-arrow-up" />
@ -56,7 +56,7 @@ export default {
data() {
return {
active: -1,
allowedColor: '#666',
allowedColor: '#000',
disabledColor: '#ccc'
};
},
@ -162,11 +162,12 @@ export default {
display: flex;
justify-content: space-between;
align-items: center;
flex-direction: row;
padding-right: 3px;
}
.menu-item {
background: $bg;
// background: $bg;
list-style: none;
}

View File

@ -50,6 +50,7 @@ export default {
exitScript: 'Exit Script',
drivingByPlan: 'Driving By Plan',
exitPlan: 'Exit Plan',
initialize: 'initialize',
back: 'Back',
threeDimensionalView: 'Three-Dimensional View',
threeDimensionalStation: 'Three-Dimensional Station',

View File

@ -15,6 +15,7 @@ export default {
driverPerspective: 'Driver perspective',
drivingByPlan: 'Driving by plan',
exitPlan: 'Exit plan',
initialize: 'initialize',
runGraphPreview: 'Run graph preview',
runGraphLoading: 'Run graph loading',
faultSetting: 'Fault setting',

View File

@ -50,6 +50,7 @@ export default {
exitScript: '退出剧本',
drivingByPlan: '按计划行车',
exitPlan: '退出计划',
initialize: '初始化',
back: '返回',
threeDimensionalView: '三维视图',
threeDimensionalStation: '三维车站',

View File

@ -15,6 +15,7 @@ export default {
driverPerspective: '司机视角',
drivingByPlan: '按计划行车',
exitPlan: '退出计划',
initialize: '初始化',
runGraphPreview: '运行图预览',
runGraphLoading: '运行图加载',
faultSetting: '故障设置',

View File

@ -290,4 +290,10 @@ deviceRender[deviceType.Draught] = {
zlevel: 1,
z: 5
};
// 图片
deviceRender[deviceType.IscsImage] = {
_type: deviceType.IscsImage,
zlevel: 1,
z: 5
};
export default deviceRender;

View File

@ -44,7 +44,8 @@ const deviceType = {
Electrically: 'Electrically',
Stairs: 'Stairs',
Elevator: 'Elevator',
Draught: 'Draught'
Draught: 'Draught',
IscsImage: 'IscsImage'
};
export default deviceType;

File diff suppressed because one or more lines are too long

View File

@ -67,6 +67,10 @@ class Iscs {
height: config.height
};
this.loadData(iscsDevice);
}
loadData(iscsDevice) {
// 地图数据
this.iscsDevice = iscsDevice;
@ -237,7 +241,7 @@ class Iscs {
resize(opt) {
this.$iscsZr.resize(opt);
this.$painter.updateZrSize(opt);
this.$painter.updateZrSize(opt); // 判断元素显示隐藏
}
refresh() {

View File

@ -97,6 +97,10 @@ export default class smookProofFd extends Group {
this.grouper.add(this.polygon1);
this.grouper.add(this.polyline2);
this.grouper.add(this.polyline3);
if (this.model.rotate) {
this.grouper.origin = [this.model.width / 2, this.model.width * 1.368 / 2];
this.grouper.rotation = Math.PI / 180 * Number(this.model.rotate);
}
this.add(this.grouper);
}
setModel(dx, dy) {

View File

@ -114,9 +114,9 @@ export default class ventilator extends Group {
this.grouper.add(this.rhombus2);
this.grouper.add(this.triangle);
this.grouper.add(this.line);
if (!this.model.isRight) {
if (this.model.rotate) {
this.grouper.origin = [this.model.width / 2, this.model.width * 1.368 / 2];
this.grouper.scale = [-1, 1];
this.grouper.rotation = Math.PI / 180 * Number(this.model.rotate);
}
this.add(this.grouper);

View File

@ -45,6 +45,7 @@ import Electrically from './bas/electrically';
import Stairs from './bas/stairs';
import Elevator from './bas/elevator';
import Draught from './bas/draught';
import IscsImage from './iscsImage';
const iscsShape = {};
iscsShape[deviceType.ManualAlarmButton] = ManualAlarmButton;
@ -94,6 +95,7 @@ iscsShape[deviceType.Electrically] = Electrically;
iscsShape[deviceType.Stairs] = Stairs;
iscsShape[deviceType.Elevator] = Elevator;
iscsShape[deviceType.Draught] = Draught;
iscsShape[deviceType.IscsImage] = IscsImage;
function shapefactory(device, iscs) {
const type = device.model._type;

View File

@ -0,0 +1,43 @@
import Group from 'zrender/src/container/Group';
import Image from 'zrender/src/graphic/Image';
export default class BrakeMachine extends Group {
constructor(device) {
super();
this.model = device.model;
this.zlevel = device.model.zlevel;
this.z = device.model.z;
this._type = device.model._type;
this.code = device.model.code;
this.create();
}
create() {
const model = this.model;
this.grouper = new Group({
id: this.model.code,
position: [this.model.point.x, this.model.point.y]
});
const imgUrl = require(`@/assets/iscs_icon/${model.url}`);
this.image = new Image({
zlevel: this.zlevel,
z: this.z,
style: {
image: imgUrl,
x: 0,
y: 0,
width: model.width,
height: model.height
}
});
this.grouper.add(this.image);
if (model.rotate) {
this.grouper.origin = [0, 0];
this.grouper.rotation = -Math.PI / 180 * Number(this.model.rotate);
}
this.add(this.grouper);
}
setModel(dx, dy) {
this.model.point.x += dx;
this.model.point.y += dy;
}
}

View File

@ -1,4 +1,4 @@
import deviceType from './constant/deviceType';
// import deviceType from './constant/deviceType';
import {createTransform, createBoundingRect} from './utils/parser';
class TransformHandle {

View File

@ -181,6 +181,9 @@ export function parser(data) {
zrUtil.each(data.draughtList || [], elem => {
iscsDevice[elem.code] = deviceFactory(deviceType.Draught, elem);
});
zrUtil.each(data.iscsImageList || [], elem => {
iscsDevice[elem.code] = deviceFactory(deviceType.IscsImage, elem);
});
}
return iscsDevice;
@ -251,5 +254,6 @@ export function updateIscsData(state, device) {
case deviceType.Stairs: updateIscsListByDevice(state, 'stairsList', device); break;
case deviceType.Elevator: updateIscsListByDevice(state, 'elevatorList', device); break;
case deviceType.Draught: updateIscsListByDevice(state, 'draughtList', device); break;
case deviceType.IscsImage: updateIscsListByDevice(state, 'iscsImageList', device); break;
}
}

View File

@ -98,16 +98,16 @@ export function getmodels(data) {
let backgroundmodel = {
id:"1010",
name:"xiansuidao",
name:"nbsuidao",
deviceType:"suidaobg",
type:"xiansuidao",
type:"nbsuidao",
picUrl:"",
assetUrl:"../../static/model/suidao/xiansuidao.FBX"
assetUrl:"../../static/model/suidao/nbsuidao.FBX"
}
assets.push(backgroundmodel);
models.assets = assets;
models.stationtexture = "xian3";
models.stationtexture = "nb1";
models.istexture = true;
console.log(models);
postmap.assets = JSON.stringify(models);

View File

@ -231,14 +231,14 @@ export function Moveanimate(main){
pointsoff.push(new THREE.Vector3(modelon.position.x,modelon.position.y,modelon.position.z));
// if(i == 0){
scope.initanimate(scope.animatelist[switchmodel.animacode+"on"],modelon,switchmodel.animacode+modelon.name+"on",pointson,0.01,true,i);
scope.initanimate(scope.animatelist[switchmodel.animacode+"off"],modelon,switchmodel.animacode+modelon.name+"off",pointsoff,0.01,true,leni-i-1);
scope.initanimate(scope.animatelist[switchmodel.animacode+"on"],modelon,switchmodel.animacode+modelon.name+"on",pointson,0.03,true,i);
scope.initanimate(scope.animatelist[switchmodel.animacode+"off"],modelon,switchmodel.animacode+modelon.name+"off",pointsoff,0.03,true,leni-i-1);
// }else if((i+1)<leni){
// scope.initanimate(modelon,switchmodel.animacode+modelon.name+"on",pointson,0.01,true,switchmodel.animacode+orderdata[i+1].name+"on");
// scope.initanimate(modelon,switchmodel.animacode+modelon.name+"off",pointsoff,0.01,true,switchmodel.animacode+orderdata[i-1].name+"off");
// scope.initanimate(modelon,switchmodel.animacode+modelon.name+"on",pointson,0.03,true,switchmodel.animacode+orderdata[i+1].name+"on");
// scope.initanimate(modelon,switchmodel.animacode+modelon.name+"off",pointsoff,0.03,true,switchmodel.animacode+orderdata[i-1].name+"off");
// }else{
// scope.initanimate(modelon,switchmodel.animacode+modelon.name+"on",pointson,0.01,true);
// scope.initanimate(modelon,switchmodel.animacode+modelon.name+"off",pointsoff,0.01,true,switchmodel.animacode+orderdata[i-1].name+"off");
// scope.initanimate(modelon,switchmodel.animacode+modelon.name+"on",pointson,0.03,true);
// scope.initanimate(modelon,switchmodel.animacode+modelon.name+"off",pointsoff,0.03,true,switchmodel.animacode+orderdata[i-1].name+"off");
// }
// if(switchmodel.children[i].name == "xinpian"){

View File

@ -148,13 +148,14 @@ export function Jl3ddeviceNew(dom,group,token,skinCode) {
scope.modelmanager.loadpromise(Staticmodel, scope.mixers).then(function (data) {
moveanima.initlistnew(scope.modelmanager.switchmodel.mesh);
daochamodel = scope.modelmanager.switchmodel.mesh.getObjectByName("DAOCHA");
if(scope.stationtexture["stationlist"]){
scope.modelmanager.standmodel.mesh.getObjectByName("zhantailiebiao").material.map =scope.stationtexture["stationlist"];
scope.modelmanager.standmodel.mesh.getObjectByName("zhantailiebiao").material.map.needsUpdate = true;
}
if(scope.stationtexture["pingbimen"]){
scope.modelmanager.standmodel.mesh.getObjectByName("pingbimen1").material.map =scope.stationtexture["pingbimen"];
scope.modelmanager.standmodel.mesh.getObjectByName("pingbimen1").material.map.needsUpdate = true;
}
animate();
})
});
@ -225,13 +226,14 @@ export function Jl3ddeviceNew(dom,group,token,skinCode) {
}
if (data._type == "Psd") {
console.log(data);
scope.modelmanager.standmodel.code = data.code;
scope.showmodel = scope.modelmanager.standmodel.mesh;
scope.scene.add(scope.showmodel);
if(scope.stationtexture[psdtexturemap[data.standCode]]){
scope.modelmanager.standmodel.mesh.getObjectByName("zhantaiming").material.map =scope.stationtexture[psdtexturemap[data.standCode]];
scope.modelmanager.standmodel.mesh.getObjectByName("zhantaiming").material.map.needsUpdate = true;
}
}
if(scope.showmodel){
@ -272,12 +274,13 @@ export function Jl3ddeviceNew(dom,group,token,skinCode) {
scope.scene.add(scope.showmodel);
}
if (data._type == "Psd") {;
if (data._type == "Psd") {
scope.showmodel = scope.modelmanager.standmodel.mesh;
scope.scene.add(scope.showmodel);
if(scope.stationtexture[psdtexturemap[data.standCode]]){
scope.modelmanager.standmodel.mesh.getObjectByName("zhantaiming").material.map =scope.stationtexture[psdtexturemap[data.standCode]];
scope.modelmanager.standmodel.mesh.getObjectByName("zhantaiming").material.map.needsUpdate = true;
}
}
initstatus(data);
}

View File

@ -63,6 +63,42 @@ export function Standtextureload(jlmap3dedit,assettype){
}
}
if(assettype.stationtexture == "nb1"){
if(jlmap3dedit.stationtexture){
setstationtexture(jlmap3dedit.stationtexture,"stationlist",'../../static/texture/nb1/devicelist.jpg');
setstationtexture(jlmap3dedit.stationtexture,"pingbimen",'../../static/texture/nb1/pingbimen.png');
setstationtexture(jlmap3dedit.stationtexture,"Station1533",'../../static/texture/nb1/Station1533.jpg');
setstationtexture(jlmap3dedit.stationtexture,"Station11231",'../../static/texture/nb1/Station11231.jpg');
setstationtexture(jlmap3dedit.stationtexture,"Station12421",'../../static/texture/nb1/Station12421.jpg');
setstationtexture(jlmap3dedit.stationtexture,"Station16356",'../../static/texture/nb1/Station16356.jpg');
setstationtexture(jlmap3dedit.stationtexture,"Station18678",'../../static/texture/nb1/Station18678.jpg');
setstationtexture(jlmap3dedit.stationtexture,"Station19817",'../../static/texture/nb1/Station19817.jpg');
setstationtexture(jlmap3dedit.stationtexture,"Station23567",'../../static/texture/nb1/Station23567.jpg');
setstationtexture(jlmap3dedit.stationtexture,"Station24903",'../../static/texture/nb1/Station24903.jpg');
setstationtexture(jlmap3dedit.stationtexture,"Station26416",'../../static/texture/nb1/Station26416.jpg');
setstationtexture(jlmap3dedit.stationtexture,"Station27207",'../../static/texture/nb1/Station27207.jpg');
setstationtexture(jlmap3dedit.stationtexture,"Station28032",'../../static/texture/nb1/Station28032.jpg');
setstationtexture(jlmap3dedit.stationtexture,"Station28958",'../../static/texture/nb1/Station28958.jpg');
setstationtexture(jlmap3dedit.stationtexture,"Station30520",'../../static/texture/nb1/Station30520.jpg');
setstationtexture(jlmap3dedit.stationtexture,"Station32955",'../../static/texture/nb1/Station32955.jpg');
setstationtexture(jlmap3dedit.stationtexture,"Station38286",'../../static/texture/nb1/Station38286.jpg');
setstationtexture(jlmap3dedit.stationtexture,"Station38674",'../../static/texture/nb1/Station38674.jpg');
setstationtexture(jlmap3dedit.stationtexture,"Station44173",'../../static/texture/nb1/Station44173.jpg');
setstationtexture(jlmap3dedit.stationtexture,"Station63100",'../../static/texture/nb1/Station63100.jpg');
setstationtexture(jlmap3dedit.stationtexture,"Station69378",'../../static/texture/nb1/Station69378.jpg');
setstationtexture(jlmap3dedit.stationtexture,"Station72310",'../../static/texture/nb1/Station72310.jpg');
setstationtexture(jlmap3dedit.stationtexture,"Station72764",'../../static/texture/nb1/Station72764.jpg');
setstationtexture(jlmap3dedit.stationtexture,"Station75414",'../../static/texture/nb1/Station75414.jpg');
setstationtexture(jlmap3dedit.stationtexture,"Station75494",'../../static/texture/nb1/Station75494.jpg');
setstationtexture(jlmap3dedit.stationtexture,"Station75703",'../../static/texture/nb1/Station75703.jpg');
setstationtexture(jlmap3dedit.stationtexture,"Station78392",'../../static/texture/nb1/Station78392.jpg');
setstationtexture(jlmap3dedit.stationtexture,"Station81700",'../../static/texture/nb1/Station81700.jpg');
setstationtexture(jlmap3dedit.stationtexture,"Station84098",'../../static/texture/nb1/Station84098.jpg');
setstationtexture(jlmap3dedit.stationtexture,"Station86112",'../../static/texture/nb1/Station86112.jpg');
setstationtexture(jlmap3dedit.stationtexture,"Station99584",'../../static/texture/nb1/Station99584.jpg');
}
}
//console.log(jlmap3dedit.materiallist);
}

View File

@ -185,6 +185,7 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,sta
if(data.code != trainmodel.code){
trainmodel.code = data.code;
trainmodel.nowcode = data.code;
updatedoorlight(false,false);
}
if(data.section != trainmodel.nowsection){
@ -205,6 +206,7 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,sta
if(trainmodel.openleft == "1"){
trainmodel.openleft = "0";
updatedoorlight(false,true);
for(let an=actions["traindoor"].top.length-1;an>=0;an--){
actions["traindoor"].top[an].stop();
}
@ -216,6 +218,7 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,sta
actions["traindoor"].down[an].play();
}
}else if(trainmodel.openright == "1"){
updatedoorlight(true,false);
trainmodel.openright = "0";
for(let an=actions["traindoor"].down.length-1;an>=0;an--){
actions["traindoor"].down[an].stop();
@ -429,6 +432,8 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,sta
}
}else if(trainmodel.openleft != data.open && data.open == "1"){
trainmodel.openleft = "1";
console.log(data);
updatedoorlight(true,false);
for(let an=actions["traindoor"].top.length-1;an>=0;an--){
actions["traindoor"].top[an].reset();
actions["traindoor"].top[an].time = 0;
@ -449,6 +454,7 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,sta
}
} else if (trainmodel.openright != data.open && data.open == '1') {
trainmodel.openright = "1";
updatedoorlight(false,true);
for(let an=actions["traindoor"].down.length-1;an>=0;an--){
actions["traindoor"].down[an].reset();
actions["traindoor"].down[an].time = 0;
@ -673,6 +679,7 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,sta
}
function simulationreset(data){
updatedoorlight(false,false);
for(let i=0;i<trainlisttest.group.children.length;i++){
trainlisttest.group.children[i].dispose = true;
trainlisttest.group.children[i].stopstation = null;

View File

@ -12,6 +12,7 @@ export function Materialload(jlmap3dedit,assettype){
if(assettype.stationtexture == "xian3"){
if(jlmap3dedit.stationtexture){
setstationtexture(jlmap3dedit.stationtexture,"stationlist",'../../static/texture/xian3/xian3list.jpg');
setstationtexture(jlmap3dedit.stationtexture,"pingbimen",'../../static/texture/xian3/pingbimen.png');
setstationtexture(jlmap3dedit.stationtexture,"Station18000",'../../static/texture/xian3/Station18000.jpg');
setstationtexture(jlmap3dedit.stationtexture,"Station61238",'../../static/texture/xian3/Station61238.jpg');
setstationtexture(jlmap3dedit.stationtexture,"Station41790",'../../static/texture/xian3/Station41790.jpg');
@ -43,7 +44,7 @@ export function Materialload(jlmap3dedit,assettype){
if(assettype.stationtexture == "haerbin1"){
if(jlmap3dedit.stationtexture){
setstationtexture(jlmap3dedit.stationtexture,"stationlist",'../../static/texture/heb/haerbinlist.jpg');
setstationtexture(jlmap3dedit.stationtexture,"pingbimen",'../../static/texture/heb/pingbimen.png');
setstationtexture(jlmap3dedit.stationtexture,"Station5361",'../../static/texture/heb/Station5361.jpg');
setstationtexture(jlmap3dedit.stationtexture,"Station11094",'../../static/texture/heb/Station11094.jpg');
setstationtexture(jlmap3dedit.stationtexture,"Station11136",'../../static/texture/heb/Station11136.jpg');
@ -69,7 +70,41 @@ export function Materialload(jlmap3dedit,assettype){
setstationtexture(jlmap3dedit.stationtexture,"Station96090",'../../static/texture/heb/Station96090.jpg');
}
}
if(assettype.stationtexture == "nb1"){
if(jlmap3dedit.stationtexture){
setstationtexture(jlmap3dedit.stationtexture,"stationlist",'../../static/texture/nb1/nb1list.jpg');
setstationtexture(jlmap3dedit.stationtexture,"pingbimen",'../../static/texture/nb1/pingbimen.png');
setstationtexture(jlmap3dedit.stationtexture,"Station1533",'../../static/texture/nb1/Station1533.jpg');
setstationtexture(jlmap3dedit.stationtexture,"Station11231",'../../static/texture/nb1/Station11231.jpg');
setstationtexture(jlmap3dedit.stationtexture,"Station12421",'../../static/texture/nb1/Station12421.jpg');
setstationtexture(jlmap3dedit.stationtexture,"Station16356",'../../static/texture/nb1/Station16356.jpg');
setstationtexture(jlmap3dedit.stationtexture,"Station18678",'../../static/texture/nb1/Station18678.jpg');
setstationtexture(jlmap3dedit.stationtexture,"Station19817",'../../static/texture/nb1/Station19817.jpg');
setstationtexture(jlmap3dedit.stationtexture,"Station23567",'../../static/texture/nb1/Station23567.jpg');
setstationtexture(jlmap3dedit.stationtexture,"Station24903",'../../static/texture/nb1/Station24903.jpg');
setstationtexture(jlmap3dedit.stationtexture,"Station26416",'../../static/texture/nb1/Station26416.jpg');
setstationtexture(jlmap3dedit.stationtexture,"Station27207",'../../static/texture/nb1/Station27207.jpg');
setstationtexture(jlmap3dedit.stationtexture,"Station28032",'../../static/texture/nb1/Station28032.jpg');
setstationtexture(jlmap3dedit.stationtexture,"Station28958",'../../static/texture/nb1/Station28958.jpg');
setstationtexture(jlmap3dedit.stationtexture,"Station30520",'../../static/texture/nb1/Station30520.jpg');
setstationtexture(jlmap3dedit.stationtexture,"Station32955",'../../static/texture/nb1/Station32955.jpg');
setstationtexture(jlmap3dedit.stationtexture,"Station38286",'../../static/texture/nb1/Station38286.jpg');
setstationtexture(jlmap3dedit.stationtexture,"Station38674",'../../static/texture/nb1/Station38674.jpg');
setstationtexture(jlmap3dedit.stationtexture,"Station44173",'../../static/texture/nb1/Station44173.jpg');
setstationtexture(jlmap3dedit.stationtexture,"Station63100",'../../static/texture/nb1/Station63100.jpg');
setstationtexture(jlmap3dedit.stationtexture,"Station69378",'../../static/texture/nb1/Station69378.jpg');
setstationtexture(jlmap3dedit.stationtexture,"Station72310",'../../static/texture/nb1/Station72310.jpg');
setstationtexture(jlmap3dedit.stationtexture,"Station72764",'../../static/texture/nb1/Station72764.jpg');
setstationtexture(jlmap3dedit.stationtexture,"Station75414",'../../static/texture/nb1/Station75414.jpg');
setstationtexture(jlmap3dedit.stationtexture,"Station75494",'../../static/texture/nb1/Station75494.jpg');
setstationtexture(jlmap3dedit.stationtexture,"Station75703",'../../static/texture/nb1/Station75703.jpg');
setstationtexture(jlmap3dedit.stationtexture,"Station78392",'../../static/texture/nb1/Station78392.jpg');
setstationtexture(jlmap3dedit.stationtexture,"Station81700",'../../static/texture/nb1/Station81700.jpg');
setstationtexture(jlmap3dedit.stationtexture,"Station84098",'../../static/texture/nb1/Station84098.jpg');
setstationtexture(jlmap3dedit.stationtexture,"Station86112",'../../static/texture/nb1/Station86112.jpg');
setstationtexture(jlmap3dedit.stationtexture,"Station99584",'../../static/texture/nb1/Station99584.jpg');
}
}
}
//console.log(jlmap3dedit.materiallist);

View File

@ -114,6 +114,12 @@ export function SimulationLoadNew(data,scope,netdata,mapdata,camera,controls,sce
let stationname = stationstandlist.group.children[mm].name;
stationstandlist.group.children[mm].getObjectByName("zhantailiebiao").material.map =scope.stationtexture["stationlist"];
stationstandlist.group.children[mm].getObjectByName("zhantailiebiao").material.map.needsUpdate = true;
// console.log(stationstandlist.group.children[mm].getObjectByName("menkuangyanse"));
if(stationstandlist.group.children[mm].getObjectByName("menkuangyanse")){
stationstandlist.group.children[mm].getObjectByName("menkuangyanse").material.map =scope.stationtexture["pingbimen"];
stationstandlist.group.children[mm].getObjectByName("menkuangyanse").material.map.needsUpdate = true;
}
let newmaterial = stationstandlist.group.children[mm].getObjectByName("zhantaiming").material.clone();
newmaterial.map =scope.stationtexture[stationname];
@ -123,6 +129,8 @@ export function SimulationLoadNew(data,scope,netdata,mapdata,camera,controls,sce
}
}
for(let mn=0;mn<scope.assetloader.modellist.length;mn++){
if(scope.assetloader.modellist[mn].deviceType && scope.assetloader.modellist[mn].deviceType == "suidaobg"){

View File

@ -100,7 +100,7 @@ export default class TrainBody extends Group {
const tripNumber = style.Train.trainTarget.tripNumberPrefix + (style.Train.trainTarget.defaultDirectionCode
? (model.directionCode || style.Train.trainTarget.defaultDirectionCode) + (model.tripNumber || style.Train.trainTarget.defaultTripNumber)
: model.tripNumber || style.Train.trainTarget.defaultTripNumber) + ''; // 车次号
const targetCode = style.Train.trainNumber.targetCodePrefix + (model.destinationCode || style.Train.trainNumber.defaultTargetCode) + ''; // 目的地码
const targetCode = style.Train.trainNumber.targetCodePrefix + (model.targetCode || style.Train.trainNumber.defaultTargetCode) + ''; // 目的地码
const groupNumber = style.Train.trainTargetNumber.groupNumberPrefix + (model.groupNumber || style.Train.trainTargetNumber.defaultGroupNumber) + ''; // 车组号
this.textTrainServer = new ETextName({
zlevel: model.zlevel,

View File

@ -365,31 +365,46 @@ class SkinCode extends defaultStyle {
fontColor: '#ffffff', // 控制模式字体颜色
fontWeight: 'normal', // 控制模式字体粗细
textAlign: 'middle', // 控制模式水平对齐
textVerticalAlign: 'top', // 控制模式垂直对齐
centerControlText: '中控', // 中控文字内容
substationControlText: '站控', // 站控文字内容
emergencyControlText: '紧急站控', // 紧急站控文字内容
interconnectedControlText: '连锁控' // 连锁控文字内容
// stationCenterControlText: '站中控', // 站中控文字内容
// generalAlarmControlText: '总报警' // 总报警文字内容
textVerticalAlign: 'top' // 控制模式垂直对齐
},
lamp: {
count: 3, // 控制模式灯个数
offset: { x: 20, y: 0 }, // 偏移量
offset: { x: 0, y: 0 }, // 偏移量
radiusR: 6, // 控制模式灯的半径
distance: 46, // 控制模式之间灯之间的距离
grayColor: '#7F7F7F', // 控制模式灰色
greenColor: '#00FF00', // 控制模式绿色
redColor: '#FF0000', // 控制模式红色
yellowColor: '#FFFF00', // 控制模式黄色
emergencyControlShow: true, // 紧急站控显示
centerControlShow: true, // 中控显示
substationControlShow: true, // 站控按钮显示
interconnectedControlShow: false, // 联锁控显示
centerControlButtonShow: false // 中控显示
yellowColor: '#FFFF00' // 控制模式黄色
},
arrow: {
show: false // 控制模式箭头显隐
emergencyControl: { // 紧急站控
show: true,
offset: { x: 0, y: 0 },
text: '紧急站控',
arrowShow: false,
grayColor: '#7F7F7F'
},
centerControl: { // 中控
show: true,
offset: { x: 0, y: 0 },
text: '中控',
buttonShow: false,
arrowShow: false,
grayColor: '#7F7F7F'
},
substationControl: { // 站控按钮
show: true,
offset: { x: 0, y: 0 },
text: '站控',
arrowShow: false,
grayColor: '#7F7F7F'
},
interconnectedControl: { // 联锁控
show: false,
offset: { x: 0, y: 0 },
text: '联锁控',
arrowShow: false,
grayColor: '#7F7F7F'
},
mouseOverStyle: { // 鼠标悬浮样式
fontSize: 10,
@ -628,8 +643,6 @@ class SkinCode extends defaultStyle {
haveTrainBorder: false, // 是否需创建trainBorder对象
textOffset: 4, // 字体偏移(用以控制字体据车头的距离)
trainWidthMoreText: 8, // 计算列车长度时--列车长比text多出尺寸
useSelfFormat: true, // 使用配置项的nameFormat
useSelfText: true, // 使用配置项的字体大小
displayPosition: 'margin', // 非同通信车在物理区段(有逻辑区段)上显示的位置 margin:行驶方向边缘车次窗 center: 中间位置车次窗
trainTip:true // 鼠标悬停列车状态信息框是否显示
},

View File

@ -334,31 +334,47 @@ class SkinCode extends defaultStyle {
fontColor: '#ffffff', // 字体颜色
fontWeight: 'normal', // 字体粗细
textAlign: 'middle', // 字体水平对齐
textVerticalAlign: 'top', // 字体垂直对齐
centerControlText: '中控', // 中控文字内容
substationControlText: '站控', // 站控文字内容
emergencyControlText:'紧急站控', // 紧急站控文字内容
interconnectedControlText:'连锁控' // 连锁控文字内容
// stationCenterControlText: '站中控', // 站中控文字内容
// generalAlarmControlText: '总报警' // 总报警文字内容
textVerticalAlign: 'top' // 字体垂直对齐
},
lamp: {
count: 4, // 控制模式的个数
offset: {x: 20, y: 0}, // 偏移量
offset: {x: 0, y: 0}, // 偏移量
emergencyOffset: {x: 0, y: 0},
radiusR: 4, // 控制模式灯的半径
distance: 46, // 控制模式之间灯之间的距离
grayColor: '#C0C0C0', // 控制模式灰色
greenColor: 'green', // 控制模式绿色
redColor: 'red', // 控制模式红色
yellowColor: 'yellow', // 控制模式黄色
emergencyControlShow: true, // 紧急站控显示
centerControlShow: true, // 中控显示
substationControlShow: true, // 站控按钮显示
interconnectedControlShow: false, // 联锁控显示
centerControlButtonShow: false // 中控显示
yellowColor: 'yellow' // 控制模式黄色
},
arrow: {
show: false // 控制模式箭头显隐
emergencyControl: { // 紧急站控
show: true,
offset: { x: 0, y: 0 },
text: '紧急站控',
arrowShow: false,
grayColor: '#7F7F7F'
},
centerControl: { // 中控
show: true,
offset: { x: 0, y: 0 },
text: '中控',
buttonShow: false,
arrowShow: false,
grayColor: '#7F7F7F'
},
substationControl: { // 站控按钮
show: true,
offset: { x: 0, y: 0 },
text: '站控',
arrowShow: false,
grayColor: '#7F7F7F'
},
interconnectedControl: { // 联锁控
show: false,
offset: { x: 0, y: 0 },
text: '联锁控',
arrowShow: false,
grayColor: '#7F7F7F'
}
}
};
@ -565,8 +581,6 @@ class SkinCode extends defaultStyle {
aspectRatio: 7 / 5, // 字体宽高比例用以拼接text是计算位置
textOffset: 4, // 字体偏移(用以控制字体据车头的距离)
trainWidthMoreText: 8, // 计算列车长度时--列车长比text多出尺寸
useSelfFormat: true, // 使用配置项的nameFormat
useSelfText: true, // 使用配置项的字体大小
displayPosition: 'margin', // 非同通信车在物理区段(有逻辑区段)上显示的位置 margin:行驶方向边缘车次窗 center: 中间位置车次窗
trainTip:true // 鼠标悬停列车状态信息框是否显示
},

View File

@ -324,13 +324,7 @@ class SkinCode extends defaultStyle {
fontColor: '#ffffff', // 字体颜色
fontWeight: 'normal', // 字体粗细
textAlign: 'middle', // 字体水平对齐
textVerticalAlign: 'top', // 字体垂直对齐
centerControlText: '中控', // 中控文字内容
substationControlText: '站控', // 站控文字内容
emergencyControlText:'紧急站控', // 紧急站控文字内容
interconnectedControlText:'连锁控' // 连锁控文字内容
// stationCenterControlText: '站中控', // 站中控文字内容
// generalAlarmControlText: '总报警' // 总报警文字内容
textVerticalAlign: 'top' // 字体垂直对齐
},
lamp: {
count: 4, // 控制模式的个数
@ -340,15 +334,36 @@ class SkinCode extends defaultStyle {
grayColor: '#7F7F7F', // 控制模式灰色
greenColor: '#00FF00', // 控制模式绿色
redColor: '#FF0000', // 控制模式红色
yellowColor: '#FFFF00', // 控制模式黄色
emergencyControlShow: true, // 紧急站控显示
centerControlShow: true, // 中控显示
substationControlShow: true, // 站控按钮显示
interconnectedControlShow: true, // 联锁控显示
centerControlButtonShow: false // 中控显示
yellowColor: '#FFFF00' // 控制模式黄色
},
arrow: {
show: false // 控制模式箭头显隐
emergencyControl: { // 紧急站控
show: true,
offset: { x: 0, y: 0 },
text: '紧急站控',
arrowShow: false,
grayColor: '#7F7F7F'
},
centerControl: { // 中控
show: true,
offset: { x: 0, y: 0 },
text: '中控',
buttonShow: false,
arrowShow: false,
grayColor: '#7F7F7F'
},
substationControl: { // 站控按钮
show: true,
offset: { x: 0, y: 0 },
text: '站控',
arrowShow: false,
grayColor: '#7F7F7F'
},
interconnectedControl: { // 联锁控
show: true,
offset: { x: 0, y: 0 },
text: '联锁控',
arrowShow: false,
grayColor: '#7F7F7F'
}
}
};
@ -749,8 +764,6 @@ class SkinCode extends defaultStyle {
haveTrainBorder: false, // 是否需创建trainBorder对象
textOffset: 4, // 字体偏移(用以控制字体据车头的距离)
trainWidthMoreText: 8, // 计算列车长度时--列车长比text多出尺寸
useSelfFormat: true, // 使用配置项的nameFormat
useSelfText: true, // 使用配置项的字体大小
displayPosition: 'margin', // 非同通信车在物理区段(有逻辑区段)上显示的位置 margin:行驶方向边缘车次窗 center: 中间位置车次窗
trainTip:true // 鼠标悬停列车状态信息框是否显示
},

View File

@ -346,13 +346,7 @@ class SkinCode extends defaultStyle {
fontColor: '#ffffff', // 字体颜色
fontWeight: 'normal', // 字体粗细
textAlign: 'middle', // 字体水平对齐
textVerticalAlign: 'top', // 字体垂直对齐
centerControlText: '中控', // 中控文字内容
substationControlText: '站控', // 站控文字内容
emergencyControlText:'紧急站控', // 紧急站控文字内容
interconnectedControlText:'连锁控' // 连锁控文字内容
// stationCenterControlText: '站中控', // 站中控文字内容
// generalAlarmControlText: '总报警' // 总报警文字内容
textVerticalAlign: 'top' // 字体垂直对齐
},
lamp: {
count: 2, // 控制模式灯个数
@ -362,12 +356,36 @@ class SkinCode extends defaultStyle {
grayColor: '#7F7F7F', // 控制模式灰色
greenColor: '#00FF00', // 控制模式绿色
redColor: '#FF0000', // 控制模式红色
yellowColor: '#FFFF00', // 控制模式黄色
emergencyControlShow: false, // 紧急站控显示
centerControlShow: true, // 中控显示
substationControlShow: true, // 站控按钮显示
interconnectedControlShow: false, // 联锁控显示
centerControlButtonShow: false // 中控显示
yellowColor: '#FFFF00' // 控制模式黄色
},
emergencyControl: { // 紧急站控
show: true,
offset: { x: 110, y: 0 },
text: '紧急',
arrowShow: true,
grayColor: '#7F7F7F'
},
centerControl: { // 中控
show: true,
offset: { x: 0, y: 0 },
text: '中控',
buttonShow: false,
arrowShow: false,
grayColor: '#7F7F7F'
},
substationControl: { // 站控按钮
show: true,
offset: { x: 0, y: 0 },
text: '站控',
arrowShow: true,
grayColor: '#7F7F7F'
},
interconnectedControl: { // 联锁控
show: false,
offset: { x: 0, y: 0 },
text: '联锁控',
arrowShow: false,
grayColor: '#7F7F7F'
},
arrow: {
show: true // 控制模式箭头显隐
@ -592,14 +610,11 @@ class SkinCode extends defaultStyle {
trainHeadArrowOffsetX: 3 // 列车车头三角偏移
},
common: {
useSelfFormat: true,
useSelfText: false,
trainHeight: 17, // 列车高度
trainHeadDistance: 2, // 列车和车头之间的间距
trainWidth:62, // 列车长度
trainTextFontSize: 19, // 列车字号
fontFamily: 'consolas', // 默认字体 族类
nameFontSize: 19, // 字体大小
haveTextHSDA: false, // 是否需创建textHSDA对象
haveArrowText: true, // 是否需创建arrowText对象
haveTrainBorder: false, // 是否需创建trainBorder对象

View File

@ -157,10 +157,11 @@ class SkinCode extends defaultStyle {
route: {
direction: false, // 自动进路方向
offset: { x: -4, y: 0 }, // 自动进路偏移量
routeColor: '#00FF00' // 自动进路
routeColor: '#00FF00', // 自动进路
radiusR: 6 // 信号灯半径
},
auto: {
signalFrontTriangle: false, // 信号灯前三角展示
signalFrontTriangle: true, // 信号灯前三角展示
direction: false, // 自动通过方向
offset: { x: -4, y: 0}, // 自动通过偏移量
width: 5, // 自动宽度
@ -335,13 +336,7 @@ class SkinCode extends defaultStyle {
fontColor: '#ffffff', // 字体颜色
fontWeight: 'normal', // 字体粗细
textAlign: 'middle', // 字体水平对齐
textVerticalAlign: 'top', // 字体垂直对齐
centerControlText: '中控', // 中控文字内容
substationControlText: '站控', // 站控文字内容
emergencyControlText:'紧急站控', // 紧急站控文字内容
interconnectedControlText:'连锁控' // 连锁控文字内容
// stationCenterControlText: '站中控', // 站中控文字内容
// generalAlarmControlText: '总报警' // 总报警文字内容
textVerticalAlign: 'top' // 字体垂直对齐
},
lamp: {
count: 2, // 控制模式灯个数
@ -351,15 +346,36 @@ class SkinCode extends defaultStyle {
grayColor: '#7F7F7F', // 控制模式灰色
greenColor: '#00FF00', // 控制模式绿色
redColor: '#FF0000', // 控制模式红色
yellowColor: '#FFFF00', // 控制模式黄色
emergencyControlShow: false, // 紧急站控显示
centerControlShow: true, // 中控显示
substationControlShow: true, // 站控按钮显示
interconnectedControlShow: false, // 联锁控显示
centerControlButtonShow: false // 中控显示
yellowColor: '#FFFF00' // 控制模式黄色
},
arrow: {
show: true // 控制模式箭头显隐
emergencyControl: { // 紧急站控
show: false,
offset: { x: 0, y: 0 },
text: '紧急',
arrowShow: false,
grayColor: '#7F7F7F'
},
centerControl: { // 中控
show: true,
offset: { x: 0, y: 0 },
text: '中控',
buttonShow: false,
arrowShow: false,
grayColor: '#7F7F7F'
},
substationControl: { // 站控按钮
show: true,
offset: { x: 0, y: 0 },
text: '站控',
arrowShow: true,
grayColor: '#7F7F7F'
},
interconnectedControl: { // 联锁控
show: false,
offset: { x: 0, y: 0 },
text: '联锁控',
arrowShow: false,
grayColor: '#7F7F7F'
},
mouseOverStyle: { // 鼠标悬浮样式
fontSize: null,
@ -582,9 +598,8 @@ class SkinCode extends defaultStyle {
trainHeight: 17, // 列车高度
trainHeadDistance: 2, // 列车和车头之间的间距
trainWidth: 76, // 列车长度
trainTextFontSize: 15, // 列车字号
trainTextFontSize: 10, // 列车字号
fontFamily: 'consolas', // 默认字体 族类
nameFontSize: 15, // 字体大小
haveTextHSDA: false, // 是否需创建textHSDA对象
haveArrowText: true, // 是否需创建arrowText对象
haveTrainBorder: false, // 是否需创建trainBorder对象

View File

@ -355,31 +355,47 @@ class SkinCode extends defaultStyle {
fontColor: '#ffffff', // 字体颜色
fontWeight: 'normal', // 字体粗细
textAlign: 'middle', // 字体水平对齐
textVerticalAlign: 'top', // 字体垂直对齐
centerControlText: '中控', // 中控文字内容
substationControlText: '站控', // 站控文字内容
emergencyControlText: '紧急站控', // 紧急站控文字内容
interconnectedControlText: '连锁控' // 连锁控文字内容
// stationCenterControlText: '站中控', // 站中控文字内容
// generalAlarmControlText: '总报警' // 总报警文字内容
textVerticalAlign: 'top' // 字体垂直对齐
},
lamp: {
count: 2, // 控制模式灯个数
offset: { x: 0, y: 0 }, // 控制模式灯偏移量
emergencyOffset: {x: 0, y: 0},
radiusR: 4, // 控制模式灯的半径
distance: 36, // 控制模式之间灯之间的距离
grayColor: '#7F7F7F', // 控制模式灰色
greenColor: '#00FF00', // 控制模式绿色
redColor: '#FF0000', // 控制模式红色
yellowColor: '#FFFF00', // 控制模式黄色
emergencyControlShow: false, // 紧急站控显示
centerControlShow: true, // 中控显示
substationControlShow: true, // 站控按钮显示
interconnectedControlShow: false, // 联锁控显示
centerControlButtonShow: false // 中控显示
yellowColor: '#FFFF00' // 控制模式黄色
},
arrow: {
show: true // 控制模式箭头显隐
emergencyControl: { // 紧急站控
show: false,
offset: { x: 0, y: 0 },
text: '紧急',
arrowShow: false,
grayColor: '#7F7F7F'
},
centerControl: { // 中控
show: true,
offset: { x: 0, y: 0 },
text: '中控',
buttonShow: false,
arrowShow: false,
grayColor: '#7F7F7F'
},
substationControl: { // 站控按钮
show: true,
offset: { x: 0, y: 0 },
text: '站控',
arrowShow: true,
grayColor: '#7F7F7F'
},
interconnectedControl: { // 联锁控
show: false,
offset: { x: 0, y: 0 },
text: '联锁控',
arrowShow: false,
grayColor: '#7F7F7F'
},
mouseOverStyle: { // 鼠标悬浮样式
fontSize: null,
@ -645,15 +661,12 @@ class SkinCode extends defaultStyle {
hasDelayTime: true, // 是否有延迟时间
hasCrewNum: true, // 是否有乘务组号
hasTravelNum: true, // 是否有行程号
useSelfFormat: true,
useSelfText: true,
fixedCoordinates: true, // 列车车组号等固定坐标
trainHeight: 40, // 列车高度
trainHeadDistance: 2, // 列车和车头之间的间距
trainWidth: 82, // 列车长度
trainTextFontSize: 12, // 列车字号
fontFamily: 'consolas', // 默认字体 族类
nameFontSize: 12, // 字体大小
haveTextHSDA: false, // 是否需创建textHSDA对象
haveArrowText: true, // 是否需创建arrowText对象
haveTrainBorder: false, // 是否需创建trainBorder对象

View File

@ -223,34 +223,50 @@ class SkinCode extends defaultStyle {
fontColor: '#ffffff', // 字体颜色
fontWeight: 'normal', // 字体粗细
textAlign: 'middle', // 字体水平对齐
textVerticalAlign: 'top', // 字体垂直对齐
centerControlButton: '站遥控按钮', // 中控文字内容
centerControlText: '遥控', // 中控文字内容
substationControlText: '站控', // 站控文字内容
emergencyControlText: '紧急站控', // 紧急站控文字内容
interconnectedControlText: '连锁控' // 连锁控文字内容
// stationCenterControlText: '站中控', // 站中控文字内容
// generalAlarmControlText: '总报警' // 总报警文字内容
textVerticalAlign: 'top' // 字体垂直对齐
},
lamp: {
count: 4, // 控制模式的个数
offset: { x: 20, y: 0 }, // 偏移量
emergencyOffset: {x: 0, y: 0},
radiusR: 6, // 控制模式灯的半径
distance: 46, // 控制模式之间灯之间的距离
grayColor: '#C0C0C0', // 控制模式灰色
greenColor: 'green', // 控制模式绿色
redColor: 'red', // 控制模式红色
yellowColor: 'yellow', // 控制模式黄色
emergencyControlShow: true, // 紧急站控显示
centerControlShow: true, // 中控显示
substationControlShow: true, // 站控按钮显示
interconnectedControlShow: false, // 联锁控显示
centerControlButtonShow: true, // 中控显示
stroke: '#FFFFFF', // 框的颜色
fill: 'rgba(0,0,0,0)' // 填充色
},
arrow: {
show: false // 控制模式箭头显隐
emergencyControl: { // 紧急站控
show: true,
offset: { x: 0, y: 0 },
text: '紧急站控',
arrowShow: false,
grayColor: '#7F7F7F'
},
centerControl: { // 中控
show: true,
offset: { x: 0, y: 0 },
text: '遥控',
buttonText: '站遥控按钮',
buttonShow: true,
arrowShow: false,
grayColor: '#7F7F7F'
},
substationControl: { // 站控按钮
show: true,
offset: { x: 0, y: 0 },
text: '站控',
arrowShow: false,
grayColor: '#7F7F7F'
},
interconnectedControl: { // 联锁控
show: false,
offset: { x: 0, y: 0 },
text: '联锁控',
arrowShow: false,
grayColor: '#7F7F7F'
}
}
};
@ -360,6 +376,25 @@ class SkinCode extends defaultStyle {
}
};
this[deviceType.StationTurnBack] = { // 站后折返
displayCondition: '01', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
lamp: {
fill: '#FFFF00', // 填充色
radiusR: 6 // 控制灯大小
},
text: {
fontWeight: 580,
fontSize: 12,
distance: 10
},
rect: {
fill: 'rgba(0,0,0,0)',
stroke: '#fff',
lineWidth: 2,
padding: 6
}
};
this[deviceType.AutoTurnBack] = {
// 是否显示
visibleConditions: '01',
@ -534,7 +569,17 @@ class SkinCode extends defaultStyle {
fontFamily: 'consolas',
trainBodyLineWidth: 1, // 车身line宽
changeTrainWidth: false, // 是否根据车身上车组号、服务号、车次号、目的地码显示情况改变列车长度
specialTrainType: [], // 特殊列车类型需设置显示格式
specialTrainType: [
{
type: 'MANUAL',
serviceNumber: '',
nameFormat: 'groupNumber:targetCode'
},
{
type: 'HEAD',
nameFormat: 'serviceNumber:tripNumber:targetCode'
}
], // 特殊列车类型需设置显示格式
lrPadding: 4, // 两边间隔
upPadding: 4, // 上边距离
trainSidelineColor: '#ABFE9B',
@ -562,7 +607,9 @@ class SkinCode extends defaultStyle {
targetCodePrefix: '00', // 目的地码前缀
defaultTargetCode: 'DD', // 默认目的地码
trainTargetTextAlign: 'left', // 目的地码文字显示位置
trainNumberOffset: { x: 36, y: 4 }// 目的地码偏移量
trainNumberOffset: { x: 36, y: 4 }, // 目的地码偏移量
headTypeColor: '#1CBAFD', // 头码车目的地号显示颜色
manualTypeColor: '#1CBAFD' // 人工车目的地号显示颜色
},
trainServer: {
serviceNumberPrefix: '000', // 服务号(表号)前缀
@ -577,9 +624,12 @@ class SkinCode extends defaultStyle {
trainTargetTextAlign: 'right' // 车次号文字显示位置
},
trainTargetNumber: {
groupNumberPrefix: '000', // 车组号前缀
defaultGroupNumber: 'EEE', // 默认车组号
trainTargetNumberOffset: {x: -4, y: 4}// 车组号偏移量
groupNumberPrefix: '00000', // 车组号前缀
defaultGroupNumber: 'EEEEE', // 默认车组号
trainTargetNumberOffset: {x: -4, y: 4}, // 车组号偏移量
lineNumber: '01', // 线路号在人工车时车组号拼接线路号
manualTypeColor: '#FA7FD7', // 人工车车组号显示颜色
maskText: '0' // 车组号遮罩
},
trainHead: {
trainConntWidth: 2, // 列车竖杠的宽度
@ -602,9 +652,7 @@ class SkinCode extends defaultStyle {
aspectRatio: 7 / 5, // 字体宽高比例用以拼接text是计算位置
textOffset: 4, // 字体偏移(用以控制字体据车头的距离)
trainWidthMoreText: 8, // 计算列车长度时--列车长比text多出尺寸
useSelfFormat: true, // 使用配置项的nameFormat
trainHeadColorChangeMode: 1, // 1:driveMode + runlevel
useSelfText: true, // 使用配置项的字体大小
displayPosition: 'margin', // 非同通信车在物理区段(有逻辑区段)上显示的位置 margin:行驶方向边缘车次窗 center: 中间位置车次窗
trainTip:false // 鼠标悬停列车状态信息框是否显示
},

View File

@ -350,31 +350,47 @@ class SkinCode extends defaultStyle {
fontColor: '#ffffff', // 字体颜色
fontWeight: 'normal', // 字体粗细
textAlign: 'middle', // 字体水平对齐
textVerticalAlign: 'top', // 字体垂直对齐
centerControlText: '中控', // 中控文字内容
substationControlText: '站控', // 站控文字内容
emergencyControlText:'紧急站控', // 紧急站控文字内容
interconnectedControlText:'连锁控' // 连锁控文字内容
// stationCenterControlText: '站中控', // 站中控文字内容
// generalAlarmControlText: '总报警' // 总报警文字内容
textVerticalAlign: 'top' // 字体垂直对齐
},
lamp: {
count: 2, // 控制模式灯个数
offset: {x: 0, y: 0}, // 控制模式灯偏移量
emergencyOffset: {x: 0, y: 0},
radiusR: 4, // 控制模式灯的半径
distance: 36, // 控制模式之间灯之间的距离
grayColor: '#7F7F7F', // 控制模式灰色
greenColor: '#00FF00', // 控制模式绿色
redColor: '#FF0000', // 控制模式红色
yellowColor: '#FFFF00', // 控制模式黄色
emergencyControlShow: false, // 紧急站控显示
centerControlShow: true, // 中控显示
substationControlShow: true, // 站控按钮显示
interconnectedControlShow: false, // 联锁控显示
centerControlButtonShow: false // 中控显示
yellowColor: '#FFFF00' // 控制模式黄色
},
arrow: {
show: true // 控制模式箭头显隐
emergencyControl: { // 紧急站控
show: false,
offset: { x: 0, y: 0 },
text: '紧急',
arrowShow: false,
grayColor: '#7F7F7F'
},
centerControl: { // 中控
show: true,
offset: { x: 0, y: 0 },
text: '中控',
buttonShow: false,
arrowShow: false,
grayColor: '#7F7F7F'
},
substationControl: { // 站控按钮
show: true,
offset: { x: 0, y: 0 },
text: '站控',
arrowShow: true,
grayColor: '#7F7F7F'
},
interconnectedControl: { // 联锁控
show: false,
offset: { x: 0, y: 0 },
text: '联锁控',
arrowShow: false,
grayColor: '#7F7F7F'
},
mouseOverStyle: { // 鼠标悬浮样式
fontSize: null,
@ -503,6 +519,7 @@ class SkinCode extends defaultStyle {
};
this[deviceType.StationTurnBack] = { // 站后折返
displayCondition: '01', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
lamp: {
fill: '#FFFF00', // 填充色
radiusR: 6 // 控制灯大小
@ -641,23 +658,21 @@ class SkinCode extends defaultStyle {
trainHeadFillColor: '#EF0C08', // 列车车头矩形填充颜色
directionStopType:'normal', // special 西安二号线 停车 列车方向图标不消失 normal 正常
trainHeadHeight: 'text', // 列车车头高度取决于trainBox高度
trainHeadArrowWidth: 4, // 列车车头三角宽度
trainHeadArrowWidth: 8, // 列车车头三角宽度
trainHeadArrowOffsetX: 2 // 列车车头三角偏移
},
common: {
trainHeight: 17, // 列车高度
trainHeadDistance: 2, // 列车和车头之间的间距
trainWidth: 76, // 列车长度
trainTextFontSize: 15, // 列车字号
trainTextFontSize: 30, // 列车字号
fontFamily: 'consolas', // 默认字体 族类
nameFontSize: 15, // 字体大小
haveTextHSDA: false, // 是否需创建textHSDA对象
haveArrowText: true, // 是否需创建arrowText对象
haveTrainBorder: false, // 是否需创建trainBorder对象
aspectRatio: 8 / 15, // 字体宽高比例用以拼接text是计算位置
textOffset: 1, // 字体偏移(用以控制字体据车头的距离)
trainWidthMoreText: 2, // 计算列车长度时--列车长比text多出尺寸
useSelfFormat: true, // 使用配置项的nameFormat
displayPosition: 'margin', // 非同通信车在物理区段(有逻辑区段)上显示的位置 margin:行驶方向边缘车次窗 center: 中间位置车次窗
trainTip:true // 鼠标悬停列车状态信息框是否显示
},

View File

@ -394,31 +394,47 @@ class SkinCode extends defaultStyle {
fontColor: '#ffffff', // 字体颜色
fontWeight: 'normal', // 字体粗细
textAlign: 'middle', // 字体水平对齐
textVerticalAlign: 'top', // 字体垂直对齐
centerControlText: '中控', // 中控文字内容
substationControlText: '站控', // 站控文字内容
emergencyControlText:'紧急站控', // 紧急站控文字内容
interconnectedControlText:'连锁控' // 连锁控文字内容
// stationCenterControlText: '站中控', // 站中控文字内容
// generalAlarmControlText: '总报警' // 总报警文字内容
textVerticalAlign: 'top' // 字体垂直对齐
},
lamp: {
count: 4, // 控制模式的个数
offset: {x: 20, y: 0}, // 偏移量
emergencyOffset: {x: 0, y: 0},
radiusR: 4, // 控制模式灯的半径
distance: 46, // 控制模式之间灯之间的距离
grayColor: '#C0C0C0', // 控制模式灰色
greenColor: 'green', // 控制模式绿色
redColor: 'red', // 控制模式红色
yellowColor: 'yellow', // 控制模式黄色
emergencyControlShow: true, // 紧急站控显示
centerControlShow: true, // 中控显示
substationControlShow: true, // 站控按钮显示
interconnectedControlShow: false, // 联锁控显示
centerControlButtonShow: false // 中控显示
yellowColor: 'yellow' // 控制模式黄色
},
arrow: {
show: false // 控制模式箭头显隐
emergencyControl: { // 紧急站控
show: true,
offset: { x: 0, y: 0 },
text: '紧急',
arrowShow: false,
grayColor: '#7F7F7F'
},
centerControl: { // 中控
show: true,
offset: { x: 0, y: 0 },
text: '中控',
buttonShow: false,
arrowShow: false,
grayColor: '#7F7F7F'
},
substationControl: { // 站控按钮
show: true,
offset: { x: 0, y: 0 },
text: '站控',
arrowShow: false,
grayColor: '#7F7F7F'
},
interconnectedControl: { // 联锁控
show: false,
offset: { x: 0, y: 0 },
text: '联锁控',
arrowShow: false,
grayColor: '#7F7F7F'
}
}
};
@ -737,8 +753,6 @@ class SkinCode extends defaultStyle {
aspectRatio: 7 / 5, // 字体宽高比例用以拼接text是计算位置
textOffset: 4, // 字体偏移(用以控制字体据车头的距离)
trainWidthMoreText: 8, // 计算列车长度时--列车长比text多出尺寸
useSelfFormat: true, // 使用配置项的nameFormat
useSelfText: true, // 使用配置项的字体大小
displayPosition: 'margin', // 非同通信车在物理区段(有逻辑区段)上显示的位置 margin:行驶方向边缘车次窗 center: 中间位置车次窗
trainTip:true // 鼠标悬停列车状态信息框是否显示
},

View File

@ -301,13 +301,6 @@ class Jlmap {
(list || []).forEach(elem => {
const code = elem.code;
const type = elem._type;
if (elem.deviceType === 'TRAIN' && elem.type === 'HEAD') {
elem.serviceNumber = '';
} else if (elem.deviceType === 'TRAIN' && elem.type === 'MANUAL') {
elem.serviceNumber = '';
elem.tripNumber = '';
elem.destinationCode = '';
}
const oDevice = this.mapDevice[code] || deviceFactory(type, elem);
this.hookHandle(oDevice, elem);
});

View File

@ -174,73 +174,41 @@ export default class Station extends Group {
const model = this.model;
if (model.visible && model.createControlMode) {
// 紧急站控
if (this.style.Station.StationControl.lamp.emergencyControlShow) {
this.createEmergencyControl();
// 中控按钮
this.createCenterControl();
// 站控按钮
this.createSubstationControl();
// 联锁控
this.createInterconnectedControl();
}
this.setState(model);
}
createEmergencyControl() { // 紧急站控
const model = this.model;
if (this.style.Station.StationControl.emergencyControl.show) {
this.emergencyControl = new ESingleControl({
_subType: 'emergency',
style: this.style,
zlevel: this.zlevel,
z: this.z,
point: {
x: model.controlModePoint.x - this.style.Station.StationControl.lamp.distance * 3 / 2 + this.style.Station.StationControl.lamp.offset.x,
y: model.controlModePoint.y + this.style.Station.StationControl.lamp.offset.y
x: model.controlModePoint.x - this.style.Station.StationControl.lamp.distance * 3 / 2 + this.style.Station.StationControl.emergencyControl.offset.x,
y: model.controlModePoint.y + this.style.Station.StationControl.emergencyControl.offset.y
},
context: this.style.Station.StationControl.text.emergencyControlText,
context: this.style.Station.StationControl.emergencyControl.text,
pop: false
});
this.add(this.emergencyControl);
}
// 中控按钮
if (this.style.Station.StationControl.lamp.centerControlShow) {
this.centerControl = new ESingleControl({
_subType: 'center',
style: this.style,
zlevel: this.zlevel,
z: this.z,
point: {
x: model.controlModePoint.x - this.style.Station.StationControl.lamp.distance / 2 + this.style.Station.StationControl.lamp.offset.x,
y: model.controlModePoint.y + this.style.Station.StationControl.lamp.offset.y
},
context: this.style.Station.StationControl.text.centerControlText,
pop: false
});
this.add(this.centerControl);
}
// 站控按钮
if (this.style.Station.StationControl.lamp.substationControlShow) {
this.substationControl = new ESingleControl({
_subType: 'substation',
style: this.style,
zlevel: this.zlevel,
z: this.z,
point: {
x: model.controlModePoint.x + this.style.Station.StationControl.lamp.distance / 2 + this.style.Station.StationControl.lamp.offset.x,
y: model.controlModePoint.y + this.style.Station.StationControl.lamp.offset.y
},
context: this.style.Station.StationControl.text.substationControlText,
pop: false
});
this.add(this.substationControl);
}
// 联锁控
if (this.style.Station.StationControl.lamp.interconnectedControlShow) {
this.interconnectedControl = new ESingleControl({
_subType: 'interconnected',
style: this.style,
zlevel: this.zlevel,
z: this.z,
point: {
x: model.controlModePoint.x + this.style.Station.StationControl.lamp.distance * 3 / 2 + this.style.Station.StationControl.lamp.offset.x,
y: model.controlModePoint.y + this.style.Station.StationControl.lamp.offset.y
},
context: this.style.Station.StationControl.text.interconnectedControlText || '联锁控',
pop: false
});
this.add(this.interconnectedControl);
}
// 箭头
if (this.style.Station.StationControl.arrow.show) {
const point = arrow(this.model.controlModePoint.x, this.model.controlModePoint.y + this.style.Station.StationControl.lamp.radiusR / 2, this.style.Station.StationControl.lamp.distance / 6, this.style.Station.StationControl.lamp.radiusR * 0.8);
this.arrowsControl = new EArrow({
if (this.style.Station.StationControl.emergencyControl.arrowShow) {
const x = model.controlModePoint.x - this.style.Station.StationControl.lamp.distance * 2 + this.style.Station.StationControl.emergencyControl.offset.x;
const y = model.controlModePoint.y + this.style.Station.StationControl.emergencyControl.offset.y;
const point = arrow(x, y + this.style.Station.StationControl.lamp.radiusR / 2, this.style.Station.StationControl.lamp.distance / 6, this.style.Station.StationControl.lamp.radiusR * 0.8);
this.emergencyArrowsControl = new EArrow({
zlevel: this.zlevel,
z: this.z,
style: this.style,
@ -249,14 +217,53 @@ export default class Station extends Group {
point: point,
x: model.controlModePoint.x + this.style.Station.StationControl.lamp.offset.x,
y: model.controlModePoint.y + this.style.Station.StationControl.lamp.radiusR / 2 + this.style.Station.StationControl.lamp.offset.y,
fill: this.style.Station.StationControl.lamp.grayColor,
fill: this.style.Station.StationControl.emergencyControl.grayColor,
lineWidth: 1,
stroke: this.style.sidelineColor
});
this.add(this.arrowsControl);
this.add(this.emergencyArrowsControl);
}
}
}
createCenterControl() { // 中控按钮
const model = this.model;
if (this.style.Station.StationControl.centerControl.show) {
this.centerControl = new ESingleControl({
_subType: 'center',
style: this.style,
zlevel: this.zlevel,
z: this.z,
point: {
x: model.controlModePoint.x - this.style.Station.StationControl.lamp.distance / 2 + this.style.Station.StationControl.centerControl.offset.x,
y: model.controlModePoint.y + this.style.Station.StationControl.centerControl.offset.y
},
context: this.style.Station.StationControl.centerControl.text,
pop: false
});
this.add(this.centerControl);
if (this.style.Station.StationControl.centerControl.arrowShow) {
const x = model.controlModePoint.x - this.style.Station.StationControl.lamp.distance * 3 / 2 + this.style.Station.StationControl.emergencyControl.offset.x;
const y = model.controlModePoint.y + this.style.Station.StationControl.emergencyControl.offset.y;
const point = arrow(x, y + this.style.Station.StationControl.lamp.radiusR / 2, this.style.Station.StationControl.lamp.distance / 6, this.style.Station.StationControl.lamp.radiusR * 0.8);
this.centerArrowsControl = new EArrow({
zlevel: this.zlevel,
z: this.z,
style: this.style,
count: this.count,
drict: 1,
point: point,
x: model.controlModePoint.x + this.style.Station.StationControl.lamp.offset.x,
y: model.controlModePoint.y + this.style.Station.StationControl.lamp.radiusR / 2 + this.style.Station.StationControl.lamp.offset.y,
fill: this.style.Station.StationControl.centerControl.grayColor,
lineWidth: 1,
stroke: this.style.sidelineColor
});
this.add(this.centerArrowsControl);
}
}
// 中控按钮
if (this.style.Station.StationControl.lamp.centerControlButtonShow) {
if (this.style.Station.StationControl.centerControl.buttonShow) { // 宁波一 显示
this.centerControlButton = new ESingleControl({
_subType: 'button',
style: this.style,
@ -266,7 +273,7 @@ export default class Station extends Group {
x: model.controlModePoint.x - this.style.Station.StationControl.lamp.distance * 3 / -2 + this.style.Station.StationControl.lamp.offset.x,
y: model.controlModePoint.y + this.style.Station.StationControl.lamp.offset.y
},
context: this.style.Station.StationControl.text.centerControlButton,
context: this.style.Station.StationControl.centerControl.buttonText,
pop: false
});
this.add(this.centerControlButton);
@ -284,9 +291,63 @@ export default class Station extends Group {
});
this.add(this.arcBorder);
}
}
this.setState(model);
createSubstationControl() { // 站控按钮
const model = this.model;
if (this.style.Station.StationControl.substationControl.show) {
this.substationControl = new ESingleControl({
_subType: 'substation',
style: this.style,
zlevel: this.zlevel,
z: this.z,
point: {
x: model.controlModePoint.x + this.style.Station.StationControl.lamp.distance / 2 + this.style.Station.StationControl.substationControl.offset.x,
y: model.controlModePoint.y + this.style.Station.StationControl.substationControl.offset.y
},
context: this.style.Station.StationControl.substationControl.text,
pop: false
});
this.add(this.substationControl);
if (this.style.Station.StationControl.substationControl.arrowShow) {
const x = this.model.controlModePoint.x + this.style.Station.StationControl.substationControl.offset.x;
const y = this.model.controlModePoint.y + this.style.Station.StationControl.substationControl.offset.y;
const point = arrow(x, y + this.style.Station.StationControl.lamp.radiusR / 2, this.style.Station.StationControl.lamp.distance / 6, this.style.Station.StationControl.lamp.radiusR * 0.8);
this.substationArrowsControl = new EArrow({
zlevel: this.zlevel,
z: this.z,
style: this.style,
count: this.count,
drict: 1,
point: point,
x: model.controlModePoint.x + this.style.Station.StationControl.lamp.offset.x,
y: model.controlModePoint.y + this.style.Station.StationControl.lamp.radiusR / 2 + this.style.Station.StationControl.lamp.offset.y,
fill: this.style.Station.StationControl.substationControl.grayColor,
lineWidth: 1,
stroke: this.style.sidelineColor
});
this.add(this.substationArrowsControl);
}
}
}
createInterconnectedControl() { // 联锁控
const model = this.model;
if (this.style.Station.StationControl.interconnectedControl.show) { // 成都三会显示
this.interconnectedControl = new ESingleControl({
_subType: 'interconnected',
style: this.style,
zlevel: this.zlevel,
z: this.z,
point: {
x: model.controlModePoint.x + this.style.Station.StationControl.lamp.distance * 3 / 2 + this.style.Station.StationControl.interconnectedControl.offset.x,
y: model.controlModePoint.y + this.style.Station.StationControl.interconnectedControl.offset.y
},
context: this.style.Station.StationControl.interconnectedControl.text || '联锁控',
pop: false
});
this.add(this.interconnectedControl);
}
}
handleCenter() { // 中控
@ -301,13 +362,15 @@ export default class Station extends Group {
this.substationControl && this.substationControl.setColor(this.style.Station.StationControl.lamp.yellowColor);
this.substationControl && this.substationControl.setTextColor(this.style.Station.StationControl.lamp.yellowColor); // 文字颜色
this.centerControl && this.centerControl.setColor(this.style.Station.StationControl.lamp.grayColor);
this.arrowsControl && this.arrowsControl.setColor(this.style.Station.StationControl.lamp.greenColor);
this.substationArrowsControl && this.substationArrowsControl.setColor(this.style.Station.StationControl.lamp.greenColor);
}
handleEmergency() { // 紧急站控
this.emergencyControl && this.emergencyControl.setColor(this.style.Station.StationControl.lamp.redColor);
this.emergencyControl && this.emergencyControl.setTextColor(this.style.Station.StationControl.lamp.redColor); // 紧急 颜色
this.substationControl && this.substationControl.setColor(this.style.Station.StationControl.lamp.grayColor);
this.centerControl && this.centerControl.setColor(this.style.Station.StationControl.lamp.grayColor);
this.emergencyArrowsControl && this.emergencyArrowsControl.setColor(this.style.Station.StationControl.lamp.greenColor);
}
recover() {
@ -317,6 +380,9 @@ export default class Station extends Group {
this.substationControl && this.substationControl.setTextColor(this.style.Station.StationControl.text.fontColor);
this.centerControl && this.centerControl.setColor(this.style.Station.StationControl.lamp.grayColor);
this.centerControl && this.centerControl.setTextColor(this.style.Station.StationControl.text.fontColor);
this.substationArrowsControl && this.substationArrowsControl.setColor(this.style.Station.StationControl.lamp.grayColor);
this.emergencyArrowsControl && this.emergencyArrowsControl.setColor(this.style.Station.StationControl.lamp.grayColor);
}
// 设置状态

View File

@ -12,9 +12,10 @@ export default class StationTurnBack extends Group {
this.z = 40;
this.model = model;
this.style = style;
// this.isShowShape = true;
this.isShowShape = true;
this.create();
this.setState(model);
this.setShowMode();
}
create() {
const model = this.model;
@ -104,7 +105,7 @@ export default class StationTurnBack extends Group {
// 设置状态
setState(model, tbStrategyId = null) {
// if (!this.isShowShape) return;
if (!this.isShowShape) return;
this.recover();
if (tbStrategyId) {
model.tbStrategyId = tbStrategyId;
@ -114,23 +115,30 @@ export default class StationTurnBack extends Group {
}
});
}
// console.log(model, '站后折返model')
// console.log(model, '站后折返model');
}
setShowMode() {
}
setShowStation(flag) {
// if (flag) {
// this.eachChild(item => {
// item.show();
// });
// this.isShowShape = true;
// this.setState(this.model);
// } else {
// this.eachChild(item => {
// item.hide();
// });
// this.isShowShape = false;
// }
const showMode = this.model.showMode;
const showConditions = this.style.StationTurnBack.displayCondition;
if (!showConditions || showConditions == '01' || showMode === showConditions) {
this.eachChild(item => item.show() );
} else {
this.eachChild(item => item.hide() );
}
}
setShowStation(stationCode) {
if (!stationCode || this.model.stationCode === stationCode) {
this.eachChild(item => {
item.show();
});
this.isShowShape = true;
this.setState(this.model);
} else {
this.eachChild(item => {
item.hide();
});
this.isShowShape = false;
}
}
}

View File

@ -104,7 +104,7 @@ export default class TrainBody extends Group {
? (model.directionCode || style.Train.trainTarget.defaultDirectionCode) + (model.tripNumber || style.Train.trainTarget.defaultTripNumber)
: model.tripNumber || style.Train.trainTarget.defaultTripNumber) + ''; // 车次号
const targetCode = style.Train.trainNumber.targetCodePrefix + (model.destinationCode || style.Train.trainNumber.defaultTargetCode) + ''; // 目的地码
const groupNumber = style.Train.trainTargetNumber.groupNumberPrefix + (model.groupNumber || style.Train.trainTargetNumber.defaultGroupNumber) + ''; // 车组号
const groupNumber = style.Train.trainTargetNumber.groupNumberPrefix + (style.Train.trainTargetNumber.lineNumber || '') + (model.groupNumber || style.Train.trainTargetNumber.defaultGroupNumber) + ''; // 车组号
this.textTrainServer = new ETextName({
zlevel: model.zlevel,
z: model.z + 1,
@ -157,6 +157,22 @@ export default class TrainBody extends Group {
textAlign: 'left',
textVerticalAlign: 'top'
});
if (style.Train.trainTargetNumber.maskText) {
this.textTrainTargetNumberMask = new ETextName({
zlevel: model.zlevel,
z: model.z + 2,
x: parseInt(model.point.x + style.Train.trainTargetNumber.trainTargetNumberOffset.x),
y: parseInt(model.point.y + style.Train.trainTargetNumber.trainTargetNumberOffset.y),
text: style.Train.trainTargetNumber.maskText,
textFill: style.trainTextColor,
textStroke: style.trainTextColor,
textStrokeWidth: 0,
fontSize: model.fontSize,
fontFamily: style.Train.common.fontFamily,
textAlign: 'left',
textVerticalAlign: 'top'
});
}
this.formatChangePosition(model, style);
this.add(this.trainBodyBox);
if (style.Train.common.haveTextHSDA) {
@ -338,8 +354,10 @@ export default class TrainBody extends Group {
this.style.Train.trainTarget.planTypeColor && this.textTrainTarget && this.textTrainTarget.setStyle({textFill: this.style.Train.trainTarget.planTypeColor});
} else if (type === 'MANUAL') {
this.style.Train.trainTargetNumber.manualTypeColor && this.textTrainTargetNumber && this.textTrainTargetNumber.setStyle({textFill: this.style.Train.trainTargetNumber.manualTypeColor});
this.style.Train.trainNumber.headTypeColor && this.textTrainNumber && this.textTrainNumber.setStyle({textFill: this.style.Train.trainNumber.headTypeColor});
} else if (type === 'HEAD') {
this.style.Train.trainTargetNumber.headTypeColor && this.textTrainTargetNumber && this.textTrainTargetNumber.setStyle({textFill: this.style.Train.trainTargetNumber.headTypeColor});
this.style.Train.trainNumber.headTypeColor && this.textTrainNumber && this.textTrainNumber.setStyle({textFill: this.style.Train.trainNumber.headTypeColor});
}
}
setSoonerOrLater(dt) {
@ -392,8 +410,10 @@ export default class TrainBody extends Group {
this.add(this.textTrainTarget);
} else if (ele == 'groupNumber') {
!style.Train.common.fixedCoordinates && this.textTrainTargetNumber.setStyle('x', parseInt(model.point.x + widthText + style.Train.common.textOffset));
!style.Train.common.fixedCoordinates && this.textTrainTargetNumberMask && this.textTrainTargetNumberMask.setStyle('x', parseInt(model.point.x + widthText + style.Train.common.textOffset));
widthText += this.textTrainTargetNumber.getBoundingRect().width;
this.add(this.textTrainTargetNumber);
this.textTrainTargetNumberMask && this.add(this.textTrainTargetNumberMask);
}
});
}

View File

@ -20,11 +20,9 @@ export default class Train extends Group {
this.z = 40;
this.section = null;
this.isShowShape = true;
this.fontSize = style.Train.common.useSelfText ? style.Train.common.nameFontSize || style.Train.common.trainTextFontSize : model.nameFontSize || style.Train.common.nameFontSize || style.Train.common.trainTextFontSize;
// this.fontSize = model.nameFontSize || style.Train.common.nameFontSize || style.Train.common.trainTextFontSize;
this.fontSize = model.nameFontSize || style.Train.common.trainTextFontSize;
this.newScale = this.fontSize / style.Train.common.trainTextFontSize;
this.nameFormat = style.Train.common.useSelfFormat ? style.Train.trainBody.trainNameFormat : model.nameFormat || style.Train.trainBody.trainNameFormat;
// this.nameFormat = model.nameFormat || style.Train.trainBody.trainNameFormat;
this.nameFormat = model.nameFormat || style.Train.trainBody.trainNameFormat;
if (style.Train.trainBody.specialTrainType.length > 0) {
style.Train.trainBody.specialTrainType.some((item) => {
if (model.type === item.type) {
@ -86,6 +84,7 @@ export default class Train extends Group {
maLen: model.maLen,
hold:model.hold,
jump:model.jump,
stop:model.stop,
dt: model.dt,
model: model
});
@ -165,7 +164,7 @@ export default class Train extends Group {
if (style.Train.common.haveTrainBorder) {
this.createTrainBorder();
}
if (style.Train.directionArrow.hasArrow) {
if (style.Train.directionArrow.hasArrow) { // 列车运行上下方箭头eg:宁波yi
const arrowPoint = { x: 0, y: 0 };
if (model.trainWindowModel) {
arrowPoint.x = model.trainWindowModel.point.x;
@ -216,60 +215,6 @@ export default class Train extends Group {
this.trainR && this.trainR.setArrowShow(false);
}
// 设置服务号状态类型
setServerNoType(type) {
if (this.style.Train.trainStatusStyle.serverNoType.length > 0) {
const flag = this.style.Train.trainStatusStyle.serverNoType.some((item) => {
if (type === item.type) {
this.trainB && this.trainB.setTextTrainServerColor(item.showColor);
return true;
}
});
if (this.style.Train.trainStatusStyle.defaultServerNoColor && !flag) {
this.trainB && this.trainB.setTextTrainServerColor(this.style.Train.trainStatusStyle.defaultServerNoColor);
}
}
}
// 设置目的地状态
setDestinationStatus(status) {
if (this.style.Train.trainStatusStyle.destinationStatus.length > 0) {
const flag = this.style.Train.trainStatusStyle.destinationStatus.some((item) => {
if (status === item.status) {
switch (this.style.Train.trainStatusStyle.destinationStatusSetText) {
case 'trainTarget':
this.trainB && this.trainB.setTextTrainTargetColor(item.showColor);
break;
case 'trainServer':
this.trainB && this.trainB.setTextTrainServerColor(item.showColor);
break;
case 'trainWindowBorder':
this.trainB && this.trainB.setBodyBoxShape('stroke', item.showColor);
break;
default:
this.trainB && this.trainB.setTextTrainTargetColor(item.showColor);
}
return true;
}
});
if (this.style.Train.trainStatusStyle.defaultDestinationColor && !flag) {
switch (this.style.Train.trainStatusStyle.destinationStatusSetText) {
case 'trainTarget':
this.trainB && this.trainB.setTextTrainTargetColor(this.style.Train.trainStatusStyle.defaultDestinationColor);
break;
case 'trainServer':
this.trainB && this.trainB.setTextTrainServerColor(this.style.Train.trainStatusStyle.defaultDestinationColor);
break;
case 'trainWindowBorder':
this.trainB && this.trainB.setBodyBoxShape('stroke', this.style.Train.trainStatusStyle.defaultDestinationColor);
break;
default:
this.trainB && this.trainB.setTextTrainTargetColor(this.style.Train.trainStatusStyle.defaultDestinationColor);
}
}
}
}
// 设置运行方向状态类型
setDirectionType(right, flag) {
if (this.style.Train.trainStatusStyle.directionType.length > 0) {
@ -384,18 +329,6 @@ export default class Train extends Group {
this.trainB && this.trainB.setAShow(false);
}
}
setTrainTypeStatus(type) {
if (this.style.Train.trainStatusStyle.trainTypeStatus) {
this.style.Train.trainStatusStyle.trainTypeStatus.some((item) => {
if (type === item.type) {
item.serviceNumberColor && this.trainB && this.trainB.setTextTrainServerColor(item.serviceNumberColor);
item.trainNumberColor && this.trainB && this.trainB.setTextTrainNumberColor(item.trainNumberColor);
item.trainTargetColor && this.trainB && this.trainB.setTextTrainTargetColor(item.trainTargetColor);
item.groupNumberColor && this.trainB && this.trainB.setTextTrainTargetNumberColor(item.groupNumberColor);
}
});
}
}
// 设置状态
setState(model, object) {
if (!this.isShowShape) return;
@ -409,7 +342,6 @@ export default class Train extends Group {
}
this.setRunStatus(model.stop, flag);
this.setCommunicationStatus(model.runLevel);
// this.setTrainTypeStatus(model.type); 配合早晚点设置
this.setDoorStatus(model.doorCloseLock);
this.setAlarmStatus(model.alarmStatus);
this.setHoldStatus(model.hold);
@ -422,19 +354,6 @@ export default class Train extends Group {
this.updateSection(object);
}
}
// let points = [];
// if (model) {
// this.recover();
// this.setServerNoType(model.serverNoType); // 设置服务号状态类型
// this.setDestinationStatus(model.destinationStatus); // 设置目的地状态
// this.setRunStatus(model.runStatus, flag); // 设置运行状态
// this.setRunMode(model.runMode); // 设置运行模式
// this.setRunControlStatus(model.runControlStatus); // 设置运行控制状态类型
// this.setDoorStatus(model.doorStatus); // 设置车门状态类型
// this.setCommunicationStatus(model.communicationStatus); // 设置通信状态类型
// this.setAlarmStatus(model.alarmStatus); // 设置报警状态
// this.setTrainTypeStatus(model.type); // 根据列车类型设置列车识别号样式
// }
}
setTrainTypeColor(type) {
this.trainB && this.trainB.setTrainTypeColor(type);

View File

@ -35,8 +35,6 @@ class Model {
atsAutoTriggerShow: true // ATS自动触发表示灯显示
};
this['private'][deviceType.Train] = {
nameFormat: 'targetCode:serviceNumber:tripNumber', // 字体格式
nameFontSize: 10 // 字体大小
};
this['private'][deviceType.TrainWindow] = {
trainWindowShow: true

View File

@ -35,8 +35,6 @@ class Model {
atsAutoTriggerShow: true // ATS自动触发表示灯显示
};
this['private'][deviceType.Train] = {
nameFormat: 'targetCode:serviceNumber:tripNumber', // 字体格式
nameFontSize: 10 // 字体大小
};
this['private'][deviceType.TrainWindow] = {
trainWindowShow: true

View File

@ -35,8 +35,6 @@ class Model {
atsAutoTriggerShow: true // ATS自动触发表示灯显示
};
this['private'][deviceType.Train] = {
nameFormat: 'targetCode:serviceNumber:tripNumber', // 字体格式
nameFontSize: 10 // 字体大小
};
this['private'][deviceType.TrainWindow] = {
trainWindowShow: true

View File

@ -130,6 +130,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '../../menus/childDialog/childDialog/noticeInfo';
import {menuOperate, commitOperate} from '../../utils/menuOperate';
import { mapGetters } from 'vuex';
export default {
name: 'StandDetainTrain',
@ -161,6 +162,9 @@ export default {
};
},
computed: {
...mapGetters('map', [
'mapConfig'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
@ -213,7 +217,7 @@ export default {
}
}
this.radio = '2';
if (this.selected.right) { //
if ((this.selected.right && this.mapConfig.upDirection === 'right') || (!this.selected.right && this.mapConfig.upDirection === 'left')) { //
this.radio = '1';
}
@ -237,7 +241,7 @@ export default {
this.radio1 = '2';
} else if (this.operation == OperationEvent.StationStand.earlyDeparture.menu.operation) {
this.earlyDepar = true;
if (!this.selected.right) {
if ((!this.selected.right && this.mapConfig.upDirection === 'right') || (this.selected.right && this.mapConfig.upDirection === 'left')) {
this.radio2 = '2';
} else {
this.radio2 = '1';
@ -246,14 +250,14 @@ export default {
this.AutomaticBuckle = true;
this.autoRadio1 = '1';
this.autoRadio = '1';
if (!this.selected.right) {
if ((!this.selected.right && this.mapConfig.upDirection === 'right') || (this.selected.right && this.mapConfig.upDirection === 'left')) {
this.autoRadio = '2';
}
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrainAuto.menu.operation) {
this.AutomaticBuckle = true;
this.autoRadio1 = '2';
this.autoRadio = '1';
if (!this.selected.right) {
if ((!this.selected.right && this.mapConfig.upDirection === 'right') || (this.selected.right && this.mapConfig.upDirection === 'left')) {
this.autoRadio = '2';
}
}
@ -303,30 +307,18 @@ export default {
}
},
setDetainTrainAuto() { //
this.sendCommand(menuOperate.StationStand.setDetainTrainAuto, {
leftDirection: this.autoRadio == '2', // 1 2
rightDirection: this.autoRadio == '1'
});
this.sendCommand(menuOperate.StationStand.setDetainTrainAuto);
},
cancelDetainTrainAuto() { //
this.sendCommand(menuOperate.StationStand.cancelDetainTrainAuto, {
leftDirection: this.autoRadio == '2', // 1 2
rightDirection: this.autoRadio == '1'
});
this.sendCommand(menuOperate.StationStand.cancelDetainTrainAuto);
},
//
setDetainTrain() {
this.sendCommand(menuOperate.StationStand.setDetainTrain, {
leftDirection: this.radio == '2', // 1 2
rightDirection: this.radio == '1'
});
this.sendCommand(menuOperate.StationStand.setDetainTrain);
},
//
cancelDetainTrain() {
this.sendCommand(menuOperate.StationStand.cancelDetainTrain, {
leftDirection: this.radio == '2', // 1 2
rightDirection: this.radio == '1'
});
this.sendCommand(menuOperate.StationStand.cancelDetainTrain);
},
//
earlyDeparture() {

View File

@ -27,10 +27,10 @@
<span class="base-label" style="display:block; padding-left: 20px;">范围</span>
<el-radio-group :id="selfStationStandId" v-model="model.val1" @change="upAndDownStreamChangeVal1">
<div style="margin-bottom: 8px;">
<el-radio :label="upstream" :disabled="model.right==false">本站台上行跳停</el-radio>
<el-radio :label="upstream" :disabled="!isUpDirection">本站台上行跳停</el-radio>
</div>
<div style="margin-bottom: 8px;">
<el-radio :label="downstream" :disabled="model.right==true">本站台下行跳停</el-radio>
<el-radio :label="downstream" :disabled="isUpDirection">本站台下行跳停</el-radio>
</div>
</el-radio-group>
<el-row>
@ -38,10 +38,10 @@
<!-- id="stand_upDown_choose" -->
<el-radio-group :id="otherStationStandId" v-model="model.val2" @change="upAndDownStreamChange">
<div style="margin-bottom: 8px;">
<el-radio :label="upstream" :disabled="model.right==false">指定列车上行跳停</el-radio>
<el-radio :label="upstream" :disabled="!isUpDirection">指定列车上行跳停</el-radio>
</div>
<div style="margin-bottom: 8px;">
<el-radio :label="downstream" :disabled="model.right==true">指定列车下行跳停</el-radio>
<el-radio :label="downstream" :disabled="isUpDirection">指定列车下行跳停</el-radio>
</div>
</el-radio-group>
</el-col>
@ -130,6 +130,7 @@ export default {
operation: null,
trainList: [],
radio1: '',
isUpDirection: true,
model: {
val1: '',
val2: '',
@ -140,7 +141,8 @@ export default {
},
computed: {
...mapGetters('map', [
'map'
'map',
'mapConfig'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
@ -225,8 +227,9 @@ export default {
}
}
this.radio1 = operate.operation;
this.isUpDirection = (this.mapConfig.upDirection === 'right' && selected.right) || (this.mapConfig.upDirection === 'left' && !selected.right);
this.model.right = selected.right;
this.model.val1 = selected.right ? '02' : '01'; // , 01: /02:
this.model.val1 = this.isUpDirection ? '02' : '01'; // , 01: /02:
this.model.val2 = '';
this.model.tripNumber = '';

View File

@ -356,35 +356,36 @@ export default {
}
]
},
{
title: '批处理命令',
operate: OperationEvent.Command.mBar.detainControl,
children: [
{
title: '全线扣车',
operate: OperationEvent.StationStand.setDetainTrainAll.mbar,
click: this.setDetainTrainAll
},
{
title: '取消全线扣车',
operate: OperationEvent.StationStand.cancelDetainTrainAll.mbar,
click: this.cancelDetainTrainAll
},
{
title: '取消上行全线扣车',
operate: OperationEvent.StationStand.cancelUpDetainTrainAll.mbar,
click: this.cancelUpDetainTrainAll
},
{
title: '取消下行全线扣车',
operate: OperationEvent.StationStand.cancelDownDetainTrainAll.mbar,
click: this.cancelDownDetainTrainAll
}
]
},
// {
// title: '',
// operate: OperationEvent.Command.mBar.detainControl,
// click: this.undeveloped,
// children: [
// {
// title: '线',
// operate: OperationEvent.StationStand.setDetainTrainAll.mbar,
// click: this.setDetainTrainAll
// },
// {
// title: '线',
// operate: OperationEvent.StationStand.cancelDetainTrainAll.mbar,
// click: this.cancelDetainTrainAll
// },
// {
// title: '线',
// operate: OperationEvent.StationStand.cancelUpDetainTrainAll.mbar,
// click: this.cancelUpDetainTrainAll
// },
// {
// title: '线',
// operate: OperationEvent.StationStand.cancelDownDetainTrainAll.mbar,
// click: this.cancelDownDetainTrainAll
// }
// ]
// },
{
title: '信息管理',
operate: '',
operate: OperationEvent.Command.mBar.detainControl,
children: [
{
title: '调度日志',
@ -402,6 +403,7 @@ export default {
},
{
title: '帮助',
operate: OperationEvent.Command.mBar.detainControl,
children: [
{
title: '关于ITS GPC 工作站',
@ -622,35 +624,36 @@ export default {
}
]
},
{
title: '批处理命令',
operate: OperationEvent.Command.mBar.detainControl,
children: [
{
title: '全线扣车',
operate: OperationEvent.StationStand.setDetainTrainAll.mbar,
click: this.setDetainTrainAll
},
{
title: '取消全线扣车',
operate: OperationEvent.StationStand.cancelDetainTrainAll.mbar,
click: this.cancelDetainTrainAll
},
{
title: '取消上行全线扣车',
operate: OperationEvent.StationStand.cancelUpDetainTrainAll.mbar,
click: this.cancelUpDetainTrainAll
},
{
title: '取消下行全线扣车',
operate: OperationEvent.StationStand.cancelDownDetainTrainAll.mbar,
click: this.cancelDownDetainTrainAll
}
]
},
// {
// title: '',
// operate: OperationEvent.Command.mBar.detainControl,
// click: this.undeveloped,
// children: [
// {
// title: '线',
// operate: OperationEvent.StationStand.setDetainTrainAll.mbar,
// click: this.setDetainTrainAll
// },
// {
// title: '线',
// operate: OperationEvent.StationStand.cancelDetainTrainAll.mbar,
// click: this.cancelDetainTrainAll
// },
// {
// title: '线',
// operate: OperationEvent.StationStand.cancelUpDetainTrainAll.mbar,
// click: this.cancelUpDetainTrainAll
// },
// {
// title: '线',
// operate: OperationEvent.StationStand.cancelDownDetainTrainAll.mbar,
// click: this.cancelDownDetainTrainAll
// }
// ]
// },
{
title: '信息管理',
operate: '',
operate: OperationEvent.Command.mBar.detainControl,
children: [
{
title: '调度日志',
@ -668,6 +671,7 @@ export default {
},
{
title: '帮助',
operate: OperationEvent.Command.mBar.detainControl,
children: [
{
title: '关于ITS GPC 工作站',
@ -808,7 +812,7 @@ export default {
};
this.tempClassA = index;
this.tempClassB = -1;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
@ -829,7 +833,7 @@ export default {
operation: item.operate.operation
};
this.tempClassB = index;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
@ -847,7 +851,7 @@ export default {
const operate = {
operation: order.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
@ -862,7 +866,7 @@ export default {
operation: order.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
@ -876,7 +880,7 @@ export default {
type: 'bar',
operation: order.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
@ -891,7 +895,7 @@ export default {
operation: order.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
@ -906,7 +910,7 @@ export default {
operation: order.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
@ -921,7 +925,7 @@ export default {
operation: order.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
@ -935,7 +939,7 @@ export default {
type: 'bar',
operation: order.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
@ -949,7 +953,7 @@ export default {
type: 'bar',
operation: order.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
@ -963,7 +967,7 @@ export default {
type: 'bar',
operation: order.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
@ -977,7 +981,7 @@ export default {
type: 'bar',
operation: order.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
@ -991,7 +995,7 @@ export default {
type: 'bar',
operation: order.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });

View File

@ -91,7 +91,7 @@ export default {
loading: false,
operate: null,
operation: '',
planMode: 5,
planMode: 2,
headMode: 5,
fontSize: 19
};

View File

@ -35,8 +35,8 @@ class Model {
atsAutoTriggerShow: true // ATS自动触发表示灯显示
};
this['private'][deviceType.Train] = {
nameFormat: 'targetCode:serviceNumber:tripNumber', // 字体格式
nameFontSize: 10 // 字体大小
nameFormat: 'serviceNumber:groupNumber', // 字体格式
nameFontSize: 19 // 字体大小
};
this['private'][deviceType.TrainWindow] = {
trainWindowShow: true

View File

@ -162,7 +162,7 @@ export default {
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
@ -182,7 +182,7 @@ export default {
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
@ -202,7 +202,7 @@ export default {
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
@ -222,7 +222,7 @@ export default {
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
@ -242,7 +242,7 @@ export default {
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
@ -262,7 +262,7 @@ export default {
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
@ -283,7 +283,7 @@ export default {
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
@ -304,7 +304,7 @@ export default {
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
@ -325,7 +325,7 @@ export default {
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
@ -341,7 +341,7 @@ export default {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}

View File

@ -86,7 +86,7 @@ export default {
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {
@ -104,7 +104,7 @@ export default {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {
this.$emit('setOperate', { step: 0, success: false });

View File

@ -279,7 +279,7 @@ export default {
this.setMessage(this.$t('tip.firstConfirmTip'));
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
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) {
@ -299,7 +299,7 @@ export default {
this.setMessage(this.$t('tip.firstConfirmTip'));
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.setButtonEnable({ step: 1 });
@ -325,7 +325,7 @@ export default {
this.setMessage(this.$t('tip.secondConfirmTip'));
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.timeCountCommand = -1;
@ -355,7 +355,7 @@ export default {
}
this.setMessage('');
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.timeCountCommand = -1;
this.timeCountConfirm = -1;
this.setButtonEnable({ step: -1 });
@ -385,7 +385,7 @@ export default {
}
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSuspend'), result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.setButtonEnable({ step: 0 });
@ -402,7 +402,7 @@ export default {
operation: OperationEvent.Command.close.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}

View File

@ -40,7 +40,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
import ConfirmControl from './childDialog/confirmControl';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { menuOperate, commitOperate } from '../utils/menuOperate';
export default {
name: 'RouteControl',
@ -144,172 +144,95 @@ export default {
},
//
cancelTrainRoute() {
if (this.$store.state.training.prdType == '01') {
/** 现地工作站*/
this.cancelTrainRouteByLocal();
} else if (this.$store.state.training.prdType == '02') {
/** 行调工作站*/
this.cancelTrainRouteByCentral();
}
},
//
cancelTrainRouteByLocal() {
const operate = {
over: true,
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
cancelTrainRouteByCentral() {
const operate = {
over: true,
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE,
messages: [this.$t('tip.signalModeToManualModeTipPrefix') + this.signalName + this.$t('tip.signalModeToManualModeTipSuffix')]
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
commitOperate(menuOperate.Signal.cancelTrainRoute, {}, 1).then(({valid, operate})=>{
this.loading = false;
if (valid) {
this.doClose();
if (this.$store.state.training.prdType === '02') {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.confirmControl.doShow(operate, this.selected);
operate['messages'] = [this.$t('tip.signalModeToManualModeTipPrefix') + this.signalName + this.$t('tip.signalModeToManualModeTipSuffix')];
this.$refs.confirmControl.doShow(operate);
}
}).catch(() => {
}
}).catch((error) => {
console.log(error);
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow();
});
},
//
signalClose() {
const operate = {
operation: OperationEvent.Signal.signalClose.menu.operation,
messages: [this.$t('menu.menuSignal.signalOff') + this.$t('global.colon') + this.signalName]
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
commitOperate(menuOperate.Signal.signalClose, {}, 1).then(({valid, operate})=>{
this.loading = false;
if (valid) {
this.doClose();
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
operate['messages'] = [this.$t('menu.menuSignal.signalOff') + this.$t('global.colon') + this.signalName];
this.$refs.confirmControl.doShow(operate);
}
}).catch(() => {
this.loading = false;
this.doClose();
});
},
//
reopenSignal() {
const operate = {
operation: OperationEvent.Signal.reopenSignal.menu.operation,
messages: [this.$t('menu.menuSignal.signalReopen') + this.$t('global.colon') + this.signalName]
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
commitOperate(menuOperate.Signal.reopenSignal, {}, 1).then(({valid, operate})=>{
this.loading = false;
if (valid) {
this.doClose();
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
operate['messages'] = [this.$t('menu.menuSignal.signalReopen') + this.$t('global.colon') + this.signalName];
this.$refs.confirmControl.doShow(operate);
}
}).catch(() => {
this.loading = false;
this.doClose();
});
},
//
setAutoInterlock() {
const operate = {
over: true,
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO,
operation: OperationEvent.Signal.setAutoInterlock.menu.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
commitOperate(menuOperate.Signal.setAutoInterlock, {}, 2).then(({valid, operate}) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
cancelAutoInterlock() {
const operate = {
over: true,
operation: OperationEvent.Signal.cancelAutoInterlock.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
commitOperate(menuOperate.Signal.cancelAutoInterlock, {}, 2).then(({valid, operate}) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
setAutoTrigger() {
const operate = {
over: true,
operation: OperationEvent.Signal.setAutoTrigger.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO_TRIGGER
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
commitOperate(menuOperate.Signal.setAutoTrigger, {}, 2).then(({valid, operate}) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
cancelAutoTrigger() {
const operate = {
over: true,
operation: OperationEvent.Signal.cancelAutoTrigger.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO_TRIGGER
};
this.doClose();
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
commitOperate(menuOperate.Signal.cancelAutoTrigger, {}, 2).then(({valid, operate}) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
@ -317,8 +240,7 @@ export default {
const operate = {
operation: OperationEvent.Command.close.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}

View File

@ -36,14 +36,14 @@
>
<el-table-column :id="domIdChoose" prop="name" :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-if="scope.row.atsControl == '1'">{{ $t('menu.automatic2') }}</span>
<span v-else>{{ $t('menu.artificial') }}</span>
</span>
</template>
@ -83,7 +83,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
import ConfirmControl from './childDialog/confirmControl';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import {menuOperate, commitOperate} from '../utils/menuOperate';
export default {
name: 'RouteHandControl',
@ -99,7 +99,9 @@ export default {
operation: null,
selection: [],
stationName: '',
signalName: ''
signalName: '',
changeList: [],
commitDisabled: true
};
},
computed: {
@ -132,24 +134,9 @@ export default {
return this.$t('menu.menuSignal.atsAutoControl');
}
return '';
},
commitDisabled() {
let disabled = true;
if (this.selection && this.selection.length) {
disabled = false;
}
return disabled;
}
},
watch: {
//
tempData: {
handler(val, oldVal) {
this.checkTableDataSelction(val);
},
deep: true
}
},
mounted() {
this.$nextTick(() => {
@ -161,7 +148,10 @@ export default {
//
if (!this.dialogShow) {
this.signalName = '';
this.changeList = [];
this.commitDisabled = true;
this.stationName = '';
this.selection = [];
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
this.signalName = selected.name;
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
@ -172,15 +162,18 @@ export default {
if (tempData && tempData.length > 0) {
tempData.forEach(elem => {
elem.check = false;
//
this.changeList.push(false);
elem.disabled = false;
//
if (operate.operation === OperationEvent.Signal.humanControl.menu.operation &&
elem.controlType != '01') {
if (operate.operation == OperationEvent.Signal.humanControl.menu.operation &&
(elem.atsControl == 0)) {
elem.disabled = true;
} if (operate.operation === OperationEvent.Signal.atsAutoControl.menu.operation &&
elem.controlType == '01') {
this.disabledLength++;
} if (operate.operation == OperationEvent.Signal.atsAutoControl.menu.operation &&
(elem.atsControl != 0)) {
elem.disabled = true;
this.disabledLength++;
}
});
}
@ -199,29 +192,40 @@ export default {
this.$refs.tempTable.setCurrentRow();
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);
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;
} else {
this.commitDisabled = true;
}
if (JSON.stringify(selection) !== JSON.stringify(this.selection)) {
this.handleChooseChange(selection);
this.selection = selection;
const operate = {val:code};
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 });
}
});
},
handleChooseChange(selection) {
this.selection = selection;
const codeList = selection.map(elem => { return elem.code; });
if (codeList && codeList.length) {
if (selection && selection.length) {
const operate = {
repeat: true,
operation: '',
val: codeList.join('::')
selection: selection
};
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
@ -232,7 +236,7 @@ export default {
operate.operation = OperationEvent.Signal.atsAutoControl.choose.operation;
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
@ -250,20 +254,10 @@ export default {
this.atsAutoControl();
}
},
//
//
humanControl() {
const codeList = this.selection.map(elem => { return elem.code; });
const operate = {
over: true,
operation: OperationEvent.Signal.humanControl.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING,
param: {
Route_Code_List: codeList
}
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
commitOperate(menuOperate.Signal.humanControl, {routeCodeList:this.selection}, 2).then(({valid})=>{
this.loading = false;
if (valid) {
this.doClose();
@ -271,23 +265,13 @@ export default {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
});
},
//
//
atsAutoControl() {
const codeList = this.selection.map(elem => { return elem.code; });
const operate = {
over: true,
operation: OperationEvent.Signal.atsAutoControl.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING,
param: {
Route_Code_List: codeList
}
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
commitOperate(menuOperate.Signal.atsAutoControl, {routeCodeList:this.selection}, 2).then(({valid})=>{
this.loading = false;
if (valid) {
this.doClose();
@ -295,7 +279,7 @@ export default {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
});
},
cancel() {
@ -303,7 +287,7 @@ export default {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}

View File

@ -109,9 +109,10 @@ export default {
}
}
/** status 04:封锁*/
const signal = (selected || {}).status;
this.tempData = [{ code: selected.code, name: selected.name, status: signal.status != '04' ? this.$t('menu.unblocked') : this.$t('menu.blocked') }];
this.tempData = [{
code: selected.code,
name: selected.name,
status: selected.blockade ? this.$t('menu.unblocked') : this.$t('menu.blocked') }];
const timer = setInterval(() => {
if (this.$refs.table) {
this.$refs.table.setCurrentRow(this.tempData[0]);
@ -138,7 +139,7 @@ export default {
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
@ -154,7 +155,7 @@ export default {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}

View File

@ -51,6 +51,7 @@ import ConfirmControl from './childDialog/confirmControl';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
import { deepAssign } from '@/utils/index';
import { mapGetters } from 'vuex';
import {menuOperate, commitOperate} from '../utils/menuOperate';
export default {
name: 'RouteSelection',
@ -225,30 +226,16 @@ export default {
},
commit() {
if (this.row && this.row.canSetting) {
let names = '';
if (this.row.overlapSectionList && this.row.overlapSectionList.length > 0) {
names = names + this.row.overlapSectionList.map(elem => { return elem.name; }).join('');
}
if (this.row.overlapSwitchList && this.row.overlapSwitchList.length > 0) {
names = names + this.row.overlapSwitchList.map(elem => { return elem.name; }).join('');
}
const operate = {
operation: OperationEvent.Signal.arrangementRoute.menu.operation,
messages: [this.$t('menu.accessSetting') + this.$t('global.colon') + `${this.row.name}${names}(${this.row.stationName})`]
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
commitOperate(menuOperate.Signal.arrangementRoute, {routeCode: this.row.code}, 2).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();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
});
}
},
@ -257,7 +244,7 @@ export default {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}

View File

@ -274,7 +274,7 @@ export default {
this.setMessage(this.$t('tip.firstConfirmTip'));
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.setButtonEnable({ step: 1 });
@ -303,7 +303,7 @@ export default {
this.setMessage(this.$t('tip.secondConfirmTip'));
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.timeCountCommand = -1;
@ -318,7 +318,9 @@ export default {
});
},
confirm2() {
const operate = {};
const operate = {
send: true
};
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
/** 区段解封*/
@ -336,7 +338,7 @@ export default {
this.setMessage('');
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.timeCountCommand = -1;
this.timeCountConfirm = -1;
this.setButtonEnable({ step: -1 });
@ -368,7 +370,7 @@ export default {
}
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSuspend'), result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.setButtonEnable({ step: 0 });
@ -385,7 +387,7 @@ export default {
operation: OperationEvent.Command.close.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}

View File

@ -29,6 +29,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { menuOperate, commitOperate } from '../utils/menuOperate';
export default {
name: 'SectionControl',
@ -112,49 +113,34 @@ export default {
},
//
lock() {
const operate = {
over: true,
operation: OperationEvent.Section.lock.menu.operation,
cmdType: CMD.Section.CMD_SECTION_BLOCK
};
this.sendCommand(operate);
this.sendCommand(menuOperate.Section.lock);
},
//
split() {
const operate = {
over: true,
operation: OperationEvent.Section.split.menu.operation,
cmdType: CMD.Section.CMD_SECTION_CUT_OFF
};
this.sendCommand(operate);
this.sendCommand(menuOperate.Section.split);
},
//
active() {
const operate = {
over: true,
operation: OperationEvent.Section.active.menu.operation,
cmdType: CMD.Section.CMD_SECTION_ACTIVE
};
this.sendCommand(operate);
this.sendCommand(menuOperate.Section.active);
},
sendCommand(operate) {
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
commitOperate(operate, {}, 2).then(({valid})=>{
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}

View File

@ -24,8 +24,19 @@
</el-col>
<el-col :span="6">
<el-form-item :label="this.$t('menu.speedLimitValue')" label-width="80px">
<el-select :id="domIdChoose" v-model="formData.SpeedLimit_Value" size="small" :disabled="spdDisabled" @change="speedSelectChange">
<el-option v-for="item in speedList" :key="item" :label="item" :value="item" />
<el-select
:id="domIdChoose"
v-model="speed"
size="small"
:disabled="spdDisabled"
@change="speedSelectChange"
>
<el-option
v-for="item in speedList"
:key="item.value"
:label="item.name"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-col>
@ -95,9 +106,7 @@ export default {
speedSpace: 5,
stationName: '',
name: '',
formData: {
SpeedLimit_Value: ''
}
speed: ''
};
},
computed: {
@ -112,9 +121,10 @@ export default {
return null;
},
speedList() {
const list = [];
for (var i = 0; i * this.speedSpace <= this.maxSpeed; i++) {
list.push(i * this.speedSpace);
const list = [{ name: '不限速', value: '0' }];
for (var i = 1; i * this.speedSpace <= this.maxSpeed; i++) {
const speed = String(i * this.speedSpace);
list.push({ name: speed, value: speed });
}
return list;
},
@ -256,7 +266,7 @@ export default {
},
deep: true
},
'formData.SpeedLimit_Value': function (val) {
'speed': function (val) {
if (val) this.cmdDisabled[0] = false;
}
},
@ -286,7 +296,7 @@ export default {
this.timer = null;
},
methods: {
doShow(operate, selected, tempData) {
doShow(operate, selected) {
if (!this.dialogShow) {
this.name = '';
this.stationName = '';
@ -314,7 +324,7 @@ export default {
this.stationName = station.name;
}
this.formData.SpeedLimit_Value = '';
this.speed = '';
this.tableData = [];
this.selected = selected;
this.timeCountCommand = -1;
@ -325,7 +335,7 @@ export default {
this.operation = operate.operation;
this.setMessage(this.$t('tip.selectSpeedLimitValueTip'));
if (this.isCancelSpeed) {
this.formData.SpeedLimit_Value = `${tempData}`;
this.speed = '0';
this.spdDisabled = true;
this.cmdDisabled = [false, true, true];
}
@ -355,7 +365,7 @@ export default {
}
this.setMessage(this.$t('tip.releaseTip'));
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.setButtonEnable({ step: 0 });
@ -368,24 +378,24 @@ export default {
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.formData.SpeedLimit_Value}` + this.$t('menu.sectionLimitSuffix');
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.$t('menu.in') + `${this.name}` + this.$t('menu.sectionCancelLimitPrefix') + `${this.formData.SpeedLimit_Value}` + this.$t('menu.sectionLimitSuffix');
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.formData.SpeedLimit_Value}` + this.$t('menu.sectionLimitSuffix');
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.$t('menu.in') + `${this.name}` + this.$t('menu.switchCancelLimitPrefix') + `${this.formData.SpeedLimit_Value}` + this.$t('menu.sectionLimitSuffix');
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/next', operate).then(({ valid }) => {
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') });
@ -416,7 +426,7 @@ export default {
this.setMessage(this.$t('tip.secondConfirmTip'));
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.timeCountCommand = -1;
@ -432,8 +442,12 @@ export default {
},
confirm2() {
const operate = {
val: this.formData.SpeedLimit_Value,
param: this.formData
over: true,
operation: '',
cmdType: '',
param: {
speedLimitValue: this.speed
}
};
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
@ -456,7 +470,7 @@ export default {
this.setMessage('');
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.timeCountCommand = -1;
this.timeCountConfirm = -1;
this.setButtonEnable({ step: -1 });
@ -491,7 +505,7 @@ export default {
}
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSuspend'), result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.setButtonEnable({ step: 0 });
@ -508,7 +522,7 @@ export default {
operation: OperationEvent.Command.close.menu.operation
};
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickToClose'), result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}

View File

@ -22,16 +22,14 @@
<div style="height: 32px;">
<el-radio
v-model="standStatus"
label="02"
:label="upRight"
style="line-height: 32px;"
:style="{color: standStatus == '02' ? '' : 'red'}"
disabled
>{{ $t('menu.upDirection') }}</el-radio>
<el-radio
v-model="standStatus"
label="01"
:label="!upRight"
style="line-height: 32px;"
:style="{color: standStatus == '01' ? '' : 'red'}"
disabled
>{{ $t('menu.downDirection') }}</el-radio>
</div>
@ -120,12 +118,14 @@ export default {
selection: [],
isSelect: true,
isConfirm: false,
strategy: ''
strategy: '',
upRight: ''
};
},
computed: {
...mapGetters('map', [
'stationList'
'stationList',
'mapConfig'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
@ -149,23 +149,25 @@ export default {
});
},
methods: {
loadInitData(selected, opts) {
loadInitData(selected) {
this.tempData = [];
const station = this.stationList.find(n => n.code == selected.stationCode);
this.tempData.push({ name: station.name, station: selected.name, strategy: opts.reentryStrategy });
this.tempData.push({ name: station.name, station: selected.name, strategy: selected.reentryStrategy || '04' });
},
doShow(operate, selected, opts) {
doShow(operate, selected) {
this.selected = selected;
if (!this.dialogShow) {
this.standStatus = '';
this.stationName = '';
this.upRight = this.mapConfig.upDirection === 'right';
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
this.standStatus = selected.direction;
this.standStatus = selected.right;
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
this.loadInitData(selected, opts);
this.loadInitData(selected);
}
this.dialogShow = true;
@ -197,7 +199,7 @@ export default {
this.strategy = strategy;
this.isSelect = false;
this.isConfirm = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
@ -213,14 +215,13 @@ export default {
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
standReentryStrategy: this.strategy
}
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();

View File

@ -30,6 +30,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { menuOperate, commitOperate } from '../utils/menuOperate';
export default {
name: 'StandDetainTrain',
@ -124,119 +125,31 @@ export default {
},
//
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/next', step).then(({ valid }) => {
this.loading = false;
this.doClose();
if (!valid) {
this.$refs.noticeInfo.doShow(step);
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(step);
});
this.sendCommand(menuOperate.StationStand.setDetainTrain);
},
//
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/next', step).then(({ valid }) => {
this.loading = false;
this.doClose();
if (!valid) {
this.$refs.noticeInfo.doShow(step);
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(step);
});
this.sendCommand(menuOperate.StationStand.cancelDetainTrain);
},
//
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/next', step).then(({ valid }) => {
this.loading = false;
this.doClose();
if (!valid) {
this.$refs.noticeInfo.doShow(step);
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(step);
});
this.sendCommand(menuOperate.StationStand.cancelDetainTrainForce);
},
//
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/next', step).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(step);
});
this.sendCommand(menuOperate.StationStand.earlyDeparture);
},
//
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/next', step).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(step);
});
this.sendCommand(menuOperate.StationStand.setJumpStop, this.selected.direction);
},
//
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.sendCommand(menuOperate.StationStand.cancelJumpStop, this.selected.direction); // , 01: /02:
},
sendCommand(operate, val) { //
this.loading = true;
this.$store.dispatch('training/next', step).then(({ valid }) => {
commitOperate(operate, {}, 2, val).then(({valid})=>{
this.loading = false;
if (valid) {
this.doClose();
@ -244,16 +157,15 @@ export default {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(step);
this.$refs.noticeInfo.doShow();
});
},
cancel() {
const step = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.loading = false;
this.$store.dispatch('training/next', step).then(({ valid }) => {
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.doClose();
}

View File

@ -90,12 +90,11 @@ export default {
});
},
methods: {
loadInitData(selected, opts) {
loadInitData(selected) {
this.tempData = [];
const index = this.stationList.findIndex(n => n.code == selected.stationCode);
let stationStand, station;
if (selected.direction == '01') { //
if (!selected.right) { //
//
if (index != 0) {
stationStand = this.$store.getters['map/getDeviceByCode'](this.stationList[index - 1].code);
@ -110,18 +109,18 @@ export default {
}
/** 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') });
this.tempData.push({ item: this.$t('menu.stationDetainTrain'), status: selected.stationHoldTrain ? this.$t('menu.hasBeenSet') : this.$t('menu.notSet') });
this.tempData.push({ item: this.$t('menu.centerDetainTrain'), status: selected.centerHoldTrain ? this.$t('menu.hasBeenSet') : this.$t('menu.notSet') });
this.tempData.push({ item: this.$t('menu.stopTime'), status: selected.parkingTime != -1 ? selected.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.runLevel'), status: selected.runLevelTime > 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') });
this.tempData.push({ item: this.$t('menu.jumpStop'), status: selected.assignSkip || selected.allSkip ? this.$t('menu.hasBeenSet') : this.$t('menu.notSet') });
this.tempData.push({ item: this.$t('menu.downSwitchbackStrategy'), status: this.strategyMap[selected.reentryStrategy] ? this.strategyMap[selected.reentryStrategy] : this.$t('menu.default') });
},
doShow(operate, selected, opts) {
doShow(operate, selected) {
if (!this.dialogShow) {
this.standName = '';
this.stationName = '';
@ -132,7 +131,7 @@ export default {
this.stationName = station.name;
}
}
this.loadInitData(selected, opts);
this.loadInitData(selected);
}
this.dialogShow = true;
this.$nextTick(function () {

View File

@ -15,10 +15,10 @@
<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-radio :id="upDown ? domIdChoose : ''" :label="rightUp">{{ $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-radio :id="!upDown ? domIdChoose : ''" :label="!rightUp">{{ $t('menu.downlinkBroadly') }}</el-radio>
</el-col>
</el-radio-group>
</el-row>
@ -68,15 +68,17 @@ export default {
return {
dialogShow: false,
loading: false,
upDown: '01',
upDown: true,
tempData: [],
disabled: true,
operation: ''
operation: '',
rightUp: true
};
},
computed: {
...mapGetters('map', [
'stationStandList'
'stationStandList',
'mapConfig'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
@ -108,9 +110,10 @@ export default {
this.tempData = [];
this.stationStandList.forEach(elem => {
/** status 01: 未扣车*/
const stand = (this.$store.getters['map/getDeviceByCode'](elem.code) || {}).status;
const stand = (this.$store.getters['map/getDeviceByCode'](elem.code) || {});
const station = (this.$store.getters['map/getDeviceByCode'](elem.stationCode) || {});
if (station && station.visible && stand && stand.holdStatus != '01' && Number(elem.direction) == Number(this.upDown)) {
console.log(stand, stand.centerHoldTrain);
if (station && station.visible && stand && stand.centerHoldTrain && elem.right == this.upDown) {
this.tempData.push({ stationName: station.name, standName: elem.name });
}
});
@ -124,7 +127,8 @@ export default {
//
if (!this.dialogShow) {
this.loading = false;
this.upDown = selected.direction;
this.upDown = selected.right;
this.rightUp = this.mapConfig.upDirection === 'right';
this.loadTableData();
this.operation = operate.operation;
}
@ -145,7 +149,7 @@ export default {
val: `${upDown}`
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
@ -158,12 +162,12 @@ export default {
cmdType: CMD.Stand.CMD_STAND_WHOLE_LINE_CANCEL_HOLD_TRAIN,
val: this.upDown,
param: {
Stand_AllLine: this.upDown
isRight: this.upDown
}
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
@ -179,7 +183,7 @@ export default {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}

View File

@ -112,8 +112,8 @@ export default {
},
timeList() {
const list = [
{ value: 0, label: this.$t('menu.automatic2') },
{ value: 1, label: '1' }
{ 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}` });
@ -137,7 +137,7 @@ export default {
});
},
methods: {
loadInitData(selected, opts) {
loadInitData(selected) {
this.tempData = [];
const index = this.stationList.findIndex(n => n.code == selected.stationCode);
if (selected.direction == '01') { //
@ -145,18 +145,18 @@ export default {
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 });
this.tempData.push({ name: `${stationStand.name}(${station.name})`, time: selected.runLevelTime ? selected.runLevelTime : 0, check: selected.runLevelTimeValidStatus });
}
} 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 });
this.tempData.push({ name: `${stationStand.name}(${station.name})`, time: selected.runLevelTime ? selected.runLevelTime : 0, check: selected.runLevelTimeValidStatus });
}
}
},
doShow(operate, selected, opts) {
doShow(operate, selected) {
//
if (!this.dialogShow) {
this.standName = '';
@ -168,7 +168,7 @@ export default {
this.stationName = station.name;
}
}
this.loadInitData(selected, opts);
this.loadInitData(selected);
}
this.dialogShow = true;
@ -195,15 +195,13 @@ export default {
const operate = {
operation: OperationEvent.StationStand.setRunLevel.choose.operation,
val: time.toString(),
param: {
Stand_RunLevel: time
}
param: {}
};
this.time = time;
this.isSelect = false;
this.isConfirm = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
@ -213,12 +211,10 @@ export default {
const operate = {
operation: OperationEvent.StationStand.setRunLevel.check.operation,
val: check.toString(),
param: {
Stand_AlwaysValid: !!this.tempData[0].check
}
param: {}
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
@ -231,19 +227,17 @@ export default {
},
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
runLevelTimeForever: !!this.tempData[0].check,
runLevelTime: 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/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
@ -263,7 +257,7 @@ export default {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}

View File

@ -44,8 +44,8 @@
<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 :label="upRight" :disabled="disabledUp">{{ $t('menu.upDirection') }}</el-radio>
<el-radio :label="!upRight" :disabled="disabledDown">{{ $t('menu.downDirection') }}</el-radio>
</el-radio-group>
</div>
</div>
@ -53,8 +53,8 @@
<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 :id="!effective? '': domIdChoose2" :label="false">{{ $t('menu.onceEffective') }}</el-radio>
<el-radio :id="effective? '': domIdChoose2" :label="true">{{ $t('menu.alwaysEffective') }}</el-radio>
</el-radio-group>
</div>
</div>
@ -75,7 +75,7 @@
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import ConfirmControl from './childDialog/confirmControl';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { mapGetters } from 'vuex';
export default {
name: 'StandStopTime',
@ -93,10 +93,14 @@ export default {
effective: false,
selected: null,
standName: '',
stationName: ''
stationName: '',
upRight: true
};
},
computed: {
...mapGetters('map', [
'mapConfig'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
@ -143,7 +147,7 @@ export default {
});
},
methods: {
doShow(operate, selected, tempDate) {
doShow(operate, selected) {
//
if (!this.dialogShow) {
this.standName = '';
@ -156,10 +160,10 @@ export default {
}
}
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.control = selected.parkingTime ? '02' : '01';
this.time = selected.parkingTime ? selected.parkingTime : 15;
this.direction = selected.right;
this.upRight = this.mapConfig.upDirection === 'right';
this.selected = selected || {};
}
this.dialogShow = true;
@ -175,19 +179,16 @@ export default {
chooseControl(control) {
/** 自动时的默认时间*/
if (control == '01') {
this.inputTime = 15;
this.time = 15;
this.effective = true;
}
const operate = {
operation: OperationEvent.StationStand.setStopTime.choose1.operation,
val: `${control}`,
param: {
Stand_StopControl: `${control}`
}
param: {}
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
@ -197,12 +198,10 @@ export default {
const operate = {
operation: OperationEvent.StationStand.setStopTime.choose2.operation,
val: `${effective}`,
param: {
Stand_AlwaysValid: `${effective}`
}
param: {}
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
@ -213,12 +212,10 @@ export default {
repeat: true,
operation: OperationEvent.StationStand.setStopTime.input.operation,
val: `${time}`,
param: {
Stand_StopTime: `${time}`
}
param: {}
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
@ -229,15 +226,14 @@ export default {
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
parkingTime: this.control === '01' ? -1 : this.time,
parkingAlwaysValid: this.control === '01' ? true : this.effective
},
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/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
@ -254,7 +250,7 @@ export default {
operation: OperationEvent.Command.close.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}

View File

@ -79,6 +79,7 @@
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { now } from '@/utils/date';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'StationCmdControl',
@ -265,7 +266,7 @@ export default {
this.setMessage(this.$t('tip.firstConfirmTip'));
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.setButtonEnable({ step: 1 });
@ -291,7 +292,7 @@ export default {
this.setMessage(this.$t('tip.secondConfirmTip'));
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.timeCountCommand = -1;
@ -313,16 +314,16 @@ export default {
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
/** 上电解锁*/
operate.operation = OperationEvent.Station.powerUnLock.confirm2.operation;
// operate.cmdType = CMD.Station.powerUnLock;
operate.cmdType = CMD.Station.CMD_STATION_POWER_ON_UNLOCK;
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
/** 执行关键操作测试*/
operate.operation = OperationEvent.Station.execKeyOperationTest.confirm2.operation;
// operate.cmdType = CMD.Station.execKeyOperationTest;
operate.cmdType = CMD.Station.CMD_STATION_KEY_OPERATION_TEST;
}
this.setMessage('');
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.timeCountCommand = -1;
this.timeCountConfirm = -1;
this.setButtonEnable({ step: -1 });
@ -352,7 +353,7 @@ export default {
}
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSuspend'), result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.setButtonEnable({ step: 0 });
@ -369,7 +370,7 @@ export default {
operation: OperationEvent.Command.close.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}

View File

@ -87,7 +87,7 @@ export default {
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
@ -103,7 +103,7 @@ export default {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}

View File

@ -109,7 +109,7 @@ export default {
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
@ -125,7 +125,7 @@ export default {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}

View File

@ -302,7 +302,7 @@ export default {
},
commandNoPopUp() {
const operate = {
operation: ''
};
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
@ -321,7 +321,7 @@ export default {
this.setMessage(this.$t('tip.firstConfirmTip'));
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.setButtonEnable({ step: 1 });
@ -335,7 +335,7 @@ export default {
},
confirm1() {
const operate = {
operation: ''
};
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
@ -354,7 +354,7 @@ export default {
this.setMessage(this.$t('tip.secondConfirmTip'));
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.timeCountCommand = -1;
@ -392,7 +392,7 @@ export default {
}
this.setMessage('');
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.timeCountCommand = -1;
this.timeCountConfirm = -1;
this.setButtonEnable({ step: -1 });
@ -428,7 +428,7 @@ export default {
}
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSuspend'), result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.setButtonEnable({ step: 0 });
@ -444,8 +444,7 @@ export default {
const operate = {
operation: OperationEvent.Command.close.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}

View File

@ -49,6 +49,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { menuOperate, commitOperate } from '../utils/menuOperate';
export default {
name: 'SwitchControl',
@ -153,133 +154,52 @@ export default {
},
//
lock() {
const operate = {
over: true,
operation: OperationEvent.Switch.lock.menu.operation,
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
this.sendCommand(menuOperate.Switch.lock);
},
//
block() {
const operate = {
over: true,
operation: OperationEvent.Switch.block.menu.operation,
cmdType: CMD.Switch.CMD_SWITCH_BLOCK
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
this.sendCommand(menuOperate.Switch.block);
},
//
turnout(operation) {
const operate = {
over: true,
operation: OperationEvent.Switch.turnout.menu.operation,
cmdType: CMD.Switch.CMD_SWITCH_TURN
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
turnout() {
this.sendCommand(menuOperate.Switch.turnout);
},
//
turnoutForce() {
const operate = {
over: true,
operation: OperationEvent.Switch.turnoutForce.menu.operation,
cmdType: CMD.Switch.CMD_SWITCH_FORCE_TURN
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
this.sendCommand(menuOperate.Switch.turnoutForce);
},
//
split() {
const operate = {
over: true,
operation: OperationEvent.Switch.split.menu.operation,
cmdType: CMD.Switch.CMD_SWITCH_CUT_OFF
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
this.sendCommand(menuOperate.Switch.split);
},
//
active() {
const operate = {
over: true,
operation: OperationEvent.Switch.active.menu.operation,
cmdType: CMD.Switch.CMD_SWITCH_ACTIVE
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
this.sendCommand(menuOperate.Switch.active);
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
},
sendCommand(operate) { //
this.loading = true;
commitOperate(operate, {}, 2).then(({valid})=>{
this.loading = false;
if (valid) {
this.doClose();
}
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(error.message);
});
}
}
};

View File

@ -17,42 +17,41 @@
/>
</el-select>
</el-form-item>
<el-form-item prop="trainType" label-width="0px">
<el-form-item prop="type" label-width="0px">
<el-radio-group
:id="domIdTrainType"
v-model="formModel.trainType"
style="margin-left: 15px;"
v-model="formModel.type"
style="margin-left: 45px;"
@change="trainTypeChange"
>
<el-radio :label="'01'">{{ $t('menu.planTrain') }}</el-radio>
<el-radio :label="'02'">{{ $t('menu.headCodeTrain') }}</el-radio>
<el-radio :label="'03'" style="margin-top:5px;">{{ $t('menu.artificialTrain') }}</el-radio>
<el-radio :label="'PLAN'">{{ $t('menu.planTrain') }}</el-radio>
<el-radio :label="'HEAD'">{{ $t('menu.headCodeTrain') }}</el-radio>
<el-radio :label="'MANUAL'" style="margin-top:5px;">{{ $t('menu.artificialTrain') }}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item v-if="formModel.trainType == '01'" prop="serviceNumber">
<span slot="label">{{ $t('menu.serviceNumber') }}</span>
<el-form-item v-if="formModel.type == 'PLAN'|| formModel.type == 'HEAD'" prop="serviceNumber">
<span slot="label">{{ $t('menu.serviceNumber') + '' }}</span>
<el-input
:id="domIdServerNo"
v-model="formModel.serviceNumber"
:disabled="serverNoIsDisabled"
/>
</el-form-item>
<el-form-item v-if="formModel.trainType == '01'" :label="this.$t('menu.tripNumber')+this.$t('global.colon')" prop="tripNumber">
<el-form-item v-if="formModel.type == 'PLAN'" :label="this.$t('menu.tripNumber')+this.$t('global.colon')" prop="tripNumber">
<el-input
:id="domIdTrainNo"
v-model="formModel.tripNumber"
:disabled="trainNoIsDisabled"
maxlength="4"
/>
</el-form-item>
<el-form-item v-if="formModel.trainType == '01'" :label="this.$t('menu.targetCode')+this.$t('global.colon')" prop="targetCode">
<el-form-item v-if="formModel.type == 'PLAN' || formModel.type == 'HEAD'" :label="this.$t('menu.targetCode')+this.$t('global.colon')" prop="destinationCode">
<el-input
:id="domIdTargetCode"
v-model="formModel.targetCode"
:disabled="targetCodeIsDisabled"
v-model="formModel.destinationCode"
:disabled="formModel.type !== 'HEAD'"
/>
</el-form-item>
<el-form-item v-if="formModel.trainType == '03'" :label="this.$t('menu.category')+this.$t('global.colon')" prop="category">
<el-form-item v-if="formModel.type == 'MANUAL'" :label="this.$t('menu.category')+this.$t('global.colon')" prop="category">
<el-select
:id="domIdTrainNumber"
v-model="formModel.category"
@ -70,7 +69,7 @@
</el-form>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="istargetCode" @click="commit">{{ $t('global.confirm') }}</el-button>
<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>
@ -84,10 +83,11 @@
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import ConfirmTrain from './childDialog/confirmTrain';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
import Handler from '@/scripts/cmdPlugin/Handler';
import { menuOperate, commitOperate } from '../utils/menuOperate';
import {getTrainDetailBytripNumber} from '@/api/simulation';
export default {
name: 'TrainControl',
@ -98,32 +98,29 @@ export default {
data() {
return {
trainList: [],
categoryList: [
{ name: 'MM', value: '01' }
],
serviceNumber:'',
formModel: {
tripNumber: '',
groupNumber: '',
trainType: '01',
type: 'PLAN',
serviceNumber: '',
targetCode: '',
destinationCode: '',
category: 'MM'
},
categoryList: [
{ name: 'MM', value: '01' }
],
rules: {
groupNumber: [
{ required: true, message: this.$t('rules.selectGroupNumber'), trigger: 'change' }
],
trainType: [
type: [
{ required: true, message: this.$t('rules.selectATrainType'), trigger: 'change' }
],
serviceNumber: [
{ required: true, message: this.$t('rules.enterTheServiceNumber'), trigger: 'blur' }
],
tripNumber: [
{ required: true, message: this.$t('rules.enterTheTripNumber'), trigger: 'blur' }
],
targetCode: [
destinationCode: [
{ required: true, message: this.$t('rules.enterTheTargetCode'), trigger: 'blur' }
]
},
@ -137,27 +134,15 @@ export default {
...mapGetters('map', [
'map'
]),
trainNoIsDisabled() {
return false;
},
serverNoIsDisabled() {
return true;
},
targetCodeIsDisabled() {
return true;
},
trainNumberIsDisabled() {
if (this.operation != OperationEvent.Train.addTrainId.menu.operation) {
return true;
}
return '';
},
// trainTypeIsDisabled() {
// if (this.operation != OperationEvent.Train.addTrainId.menu.operation) {
// return true;
// }
// return '';
// },
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
@ -243,12 +228,6 @@ export default {
return this.$t('menu.menuTrain.editTrainId');
}
return '';
},
istargetCode() {
if (this.formModel.serviceNumber && this.formModel.targetCode) {
return false;
}
return true;
}
},
watch: {
@ -259,7 +238,7 @@ export default {
this.formModel = {
groupNumber: this.formModel.groupNumber,
tripNumber: val,
trainType: this.formModel.trainType,
type: this.formModel.type,
serviceNumber: '',
targetCode: '',
category: 'MM'
@ -280,15 +259,15 @@ export default {
this.operation = operate.operation;
}
const model = this.$store.getters['map/getDeviceByCode'](selected.code);
this.serviceNumber = model.serviceNumber;
this.formModel = {
groupNumber: model.groupNumber,
tripNumber: `${model.directionCode}${model.tripNumber}`,
trainType: model.type,
tripNumber: model.tripNumber,
type: model.type ? model.type : 'PLAN',
serviceNumber: model.serviceNumber,
targetCode: model.targetCode,
destinationCode: model.destinationCode,
category: 'MM'
};
/** 加载列车数据*/
this.loadInitData(this.map);
this.dialogShow = true;
@ -304,37 +283,37 @@ export default {
},
trainNumberChange(groupNumber) {
const operate = {
val: `${groupNumber}`,
groupNumber: groupNumber,
operation: ''
};
if (this.operation == OperationEvent.Train.addTrainId.menu.operation) {
operate.operation = OperationEvent.Train.addTrainId.trainNumberChange.operation;
} else if (this.operation == OperationEvent.Train.editTrainId.menu.operation) {
operate.operation = OperationEvent.Train.editTrainId.trainNumberChange.operation;
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
},
trainTypeChange(trainType) {
if (trainType === 'HEAD') {
this.formModel.serviceNumber = '';
} else if (trainType === 'PLAN' && this.serviceNumber) {
this.formModel.serviceNumber = this.serviceNumber;
}
const operate = {
val: `${trainType}`,
type: trainType,
operation: ''
};
if (this.operation == OperationEvent.Train.addTrainId.menu.operation) {
operate.operation = OperationEvent.Train.addTrainId.trainTypeChange.operation;
} else if (this.operation == OperationEvent.Train.editTrainId.menu.operation) {
operate.operation = OperationEvent.Train.editTrainId.trainTypeChange.operation;
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
@ -342,42 +321,26 @@ export default {
},
trainNoChange(tripNumber) {
const operate = {
send: true,
val: tripNumber,
tripNumber: tripNumber,
operation: ''
};
if (this.operation == OperationEvent.Train.addTrainId.menu.operation) {
operate.operation = OperationEvent.Train.addTrainId.trainNoChange.operation;
operate.cmdType = CMD.Train.addTrainId;
} else if (this.operation == OperationEvent.Train.editTrainId.menu.operation) {
operate.operation = OperationEvent.Train.editTrainId.trainNoChange.operation;
operate.cmdType = CMD.Train.editTrainId;
}
Handler.undo(1);
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
if (valid) {
if (response.data) {
this.formModel = {
groupNumber: this.formModel.groupNumber,
tripNumber: tripNumber,
trainType: this.formModel.trainType,
serviceNumber: response.data.serviceNumber,
targetCode: response.data.targetCode,
category: 'MM'
};
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.formModel = {
groupNumber: this.formModel.groupNumber,
tripNumber: tripNumber,
trainType: this.formModel.trainType,
serviceNumber: '',
targetCode: '',
category: 'MM'
};
getTrainDetailBytripNumber(this.$route.query.group, {tripNumber:tripNumber}).then(resp => {
if (resp.data) {
this.formModel.serviceNumber = resp.data.serviceNumber;
this.formModel.destinationCode = resp.data.destinationCode;
}
}).catch(() => {
this.$message.error('获取列车信息失败!');
});
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
},
@ -394,28 +357,30 @@ export default {
addTrainId() {
this.$refs['form'].validate((valid) => {
if (valid) {
const model = this.formModel;
const operate = {
send: true,
operation: OperationEvent.Train.addTrainId.menu.operation,
cmdType: CMD.Train.CMD_ADD_TRAIN_ID,
messages: [this.$t('tip.addTrainIdTip')],
val: `${model.groupNumber}::${model.trainType}::${model.serviceNumber}::${model.tripNumber}::${model.targetCode}`
const params = {
groupNumber: this.formModel.groupNumber,
type: this.formModel.type,
serviceNumber: '',
tripNumber: '',
destinationCode: ''
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (this.formModel.type === 'PLAN') {
params.serviceNumber = this.formModel.serviceNumber;
params.tripNumber = this.formModel.tripNumber;
params.destinationCode = this.formModel.destinationCode;
} else if (this.formModel.type === 'HEAD') {
params.tripNumber = this.formModel.tripNumber;
params.destinationCode = this.formModel.destinationCode;
}
commitOperate(menuOperate.TrainWindow.addTrainId, params, 2).then(({valid})=>{
this.loading = false;
if (valid) {
this.doClose();
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.confirmTrain.doShow(operate);
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
});
} else {
return false;
@ -426,27 +391,30 @@ export default {
editTrainId() {
this.$refs['form'].validate((valid) => {
if (valid) {
const operate = {
send: true,
operation: OperationEvent.Train.editTrainId.menu.operation,
cmdType: CMD.Train.CMD_EDIT_TRAIN_ID,
messages: [this.$t('tip.editTrainIdTip')],
val: `${this.formModel.trainType}::${this.formModel.tripNumber}`
const params = {
groupNumber: this.formModel.groupNumber,
type: this.formModel.type,
serviceNumber: '',
tripNumber: '',
destinationCode: ''
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (this.formModel.type === 'PLAN') {
params.serviceNumber = this.formModel.serviceNumber;
params.tripNumber = this.formModel.tripNumber;
params.destinationCode = this.formModel.destinationCode;
} else if (this.formModel.type === 'HEAD') {
params.tripNumber = this.formModel.tripNumber;
params.destinationCode = this.formModel.destinationCode;
}
commitOperate(menuOperate.TrainWindow.editTrainId, params, 2).then(({valid})=>{
this.loading = false;
if (valid) {
this.doClose();
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.confirmTrain.doShow(operate);
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
});
} else {
return false;
@ -459,7 +427,7 @@ export default {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}

View File

@ -230,142 +230,84 @@ export default {
},
//
fault() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.Section.fault.menu.operation,
param: {
Section_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
commitOperate(menuOperate.Section.fault, {sectionCode: this.selected.code}, 0).then(({valid, operate}) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.sectionCmdControl.doShow(step, this.selected);
this.$refs.sectionCmdControl.doShow(operate, this.selected);
}
});
},
//
split() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.Section.split.menu.operation,
param: {
Section_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
commitOperate(menuOperate.Section.split, {sectionCode: this.selected.code}, 0).then(({valid, operate}) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.sectionControl.doShow(step, this.selected);
this.$refs.sectionControl.doShow(operate, this.selected);
}
});
},
//
active() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.Section.active.menu.operation,
param: {
Section_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
commitOperate(menuOperate.Section.active, {sectionCode: this.selected.code}, 0).then(({valid, operate}) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.sectionControl.doShow(step, this.selected);
this.$refs.sectionControl.doShow(operate, this.selected);
}
});
},
//
axlePreReset() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.Section.axlePreReset.menu.operation,
param: {
Section_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
commitOperate(menuOperate.Section.axlePreReset, {sectionCode: this.selected.code}, 0).then(({valid, operate}) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.sectionCmdControl.doShow(step, this.selected);
this.$refs.sectionCmdControl.doShow(operate, this.selected);
}
});
},
//
lock() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.Section.lock.menu.operation,
param: {
Section_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
commitOperate(menuOperate.Section.lock, {sectionCode: this.selected.code}, 0).then(({valid, operate}) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.sectionControl.doShow(step, this.selected);
this.$refs.sectionControl.doShow(operate, this.selected);
}
});
},
//
unlock() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.Section.unlock.menu.operation,
param: {
Section_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
commitOperate(menuOperate.Section.unlock, {sectionCode: this.selected.code}, 0).then(({valid, operate}) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.sectionCmdControl.doShow(step, this.selected);
this.$refs.sectionCmdControl.doShow(operate, this.selected);
}
});
},
//
setSpeed() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.Section.setSpeed.menu.operation,
param: {
Section_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
commitOperate(menuOperate.Section.setSpeed, {sectionCode: this.selected.code}, 0).then(({valid, operate}) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.speedCmdControl.doShow(step, this.selected);
this.$refs.speedCmdControl.doShow(operate, this.selected);
}
});
},
//
cancelSpeed() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.Section.cancelSpeed.menu.operation,
param: {
Section_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
commitOperate(menuOperate.Section.cancelSpeed, {sectionCode: this.selected.code}, 0).then(({valid, operate}) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
Handler.execute(CMD.Section.CMD_QUERY, {}).then(resp => {
const tempData = resp.data;
this.$refs.speedCmdControl.doShow(step, this.selected, tempData);
});
this.$refs.speedCmdControl.doShow(operate, this.selected);
}
});
// const step = {
// start: true,
// code: `${this.selected.code}`,
// operation: OperationEvent.Section.cancelSpeed.menu.operation,
// param: {
// Section_Code: `${this.selected.code}`
// }
// };
// this.$store.dispatch('training/next', step).then(({ valid }) => {
// if (valid) {
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
// Handler.execute(CMD.Section.CMD_QUERY, {}).then(resp => {
// const tempData = resp.data;
// this.$refs.speedCmdControl.doShow(step, this.selected, tempData);
// });
// }
// });
}
}
};

View File

@ -23,9 +23,7 @@ import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import { querySignalStatus } from '@/api/simulation';
import {menuOperate, commitOperate} from './utils/menuOperate';
export default {
@ -174,6 +172,9 @@ export default {
...mapGetters('menuOperation', [
'buttonOperation'
]),
...mapGetters('map', [
'routeList'
]),
group() {
return this.$route.query.group;
}
@ -229,240 +230,117 @@ export default {
}
});
},
//
getRouteList(selectType) {
const routes = [];
this.routeList.forEach(elem => {
if (elem.startSignalCode === selectType.code) {
routes.push(elem);
}
});
return routes;
},
//
arrangementRoute() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.Signal.arrangementRoute.menu.operation,
param: {
Signal_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
commitOperate(menuOperate.Signal.arrangementRoute, {signalCode: this.selected.code}, 0).then(({valid, operate}) => {
if (valid) {
querySignalStatus(this.group, {signalCode: `${this.selected.code}`}).then(resp => {
const tempData = resp.data;
this.$refs.routeSelection.doShow(step.operation, this.selected, tempData);
});
this.$refs.routeSelection.doShow(operate, this.selected, this.getRouteList(this.selected));
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
});
},
//
cancelTrainRoute() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
param: {
Signal_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
commitOperate(menuOperate.Signal.cancelTrainRoute, {signalCode: this.selected.code}, 0).then(({valid, operate}) => {
if (valid) {
this.$refs.routeControl.doShow(step, this.selected);
this.$refs.routeControl.doShow(operate, this.selected);
}
});
},
//
lock() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.Signal.lock.menu.operation,
param: {
Signal_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
commitOperate(menuOperate.Signal.lock, {signalCode: this.selected.code}, 0).then(({valid, operate}) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.routeLock.doShow(step.operation, this.selected);
this.$refs.routeLock.doShow(operate, this.selected);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
});
},
//
unlock() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.Signal.unlock.menu.operation,
param: {
Signal_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
commitOperate(menuOperate.Signal.unlock, {signalCode: this.selected.code}, 0).then(({valid, operate}) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.routeCmdControl.doShow(step, this.selected);
this.$refs.routeCmdControl.doShow(operate, this.selected);
}
});
},
//
reopenSignal() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.Signal.reopenSignal.menu.operation,
param: {
Signal_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
commitOperate(menuOperate.Signal.reopenSignal, {signalCode: this.selected.code}, 0).then(({valid, operate}) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.routeControl.doShow(step, this.selected);
this.$refs.routeControl.doShow(operate, this.selected);
}
});
},
//
guide() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.Signal.guide.menu.operation,
param: {
Signal_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
commitOperate(menuOperate.Signal.guide, {signalCode: this.selected.code}, 0).then(({valid, operate}) => {
if (valid) {
this.$refs.routeCmdControl.doShow(step, this.selected);
this.$refs.routeCmdControl.doShow(operate, this.selected);
}
});
},
//
setAutoInterlock() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.Signal.setAutoInterlock.menu.operation,
param: {
Signal_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
commitOperate(menuOperate.Signal.setAutoInterlock, {signalCode: this.selected.code}, 0).then(({valid, operate}) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.routeControl.doShow(step, this.selected);
this.$refs.routeControl.doShow(operate, this.selected);
}
});
},
//
cancelAutoInterlock() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.Signal.cancelAutoInterlock.menu.operation,
param: {
Signal_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
commitOperate(menuOperate.Signal.cancelAutoInterlock, {signalCode: this.selected.code}, 0).then(({valid, operate}) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.routeControl.doShow(step, this.selected);
this.$refs.routeControl.doShow(operate, this.selected);
}
});
},
//
setAutoTrigger() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.Signal.setAutoTrigger.menu.operation,
param: {
Signal_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
commitOperate(menuOperate.Signal.setAutoTrigger, {signalCode: this.selected.code}, 0).then(({valid, operate}) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.routeControl.doShow(step, this.selected);
this.$refs.routeControl.doShow(operate, this.selected);
}
});
},
//
cancelAutoTrigger() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.Signal.cancelAutoTrigger.menu.operation,
param: {
Signal_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
commitOperate(menuOperate.Signal.cancelAutoTrigger, {signalCode: this.selected.code}, 0).then(({valid, operate}) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.routeControl.doShow(step, this.selected);
this.$refs.routeControl.doShow(operate, this.selected);
}
});
},
//
signalClose() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.Signal.signalClose.menu.operation,
param: {
Signal_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
commitOperate(menuOperate.Signal.signalClose, {signalCode: this.selected.code}, 0).then(({valid, operate}) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.routeControl.doShow(step, this.selected);
this.$refs.routeControl.doShow(operate, this.selected);
}
});
},
// ()
humanControl() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.Signal.humanControl.menu.operation,
param: {
Signal_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid, response }) => {
commitOperate(menuOperate.Signal.humanControl, {signalCode: this.selected.code}, 0).then(({valid, operate}) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
querySignalStatus(this.group, {signalCode: `${this.selected.code}`}).then(resp => {
const tempData = resp.data;
this.$refs.routeHandControl.doShow(step, this.selected, tempData);
});
this.$refs.routeHandControl.doShow(operate, this.selected, this.getRouteList(this.selected));
}
});
},
// ATS
atsAutoControl() {
const step = {
start: true,
Signal_Code: `${this.selected.code}`,
code: `${this.selected.code}`,
operation: OperationEvent.Signal.atsAutoControl.menu.operation,
param: {
Signal_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid, response }) => {
commitOperate(menuOperate.Signal.atsAutoControl, {signalCode: this.selected.code}, 0).then(({valid, operate}) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
querySignalStatus(this.group, {signalCode: `${this.selected.code}`}).then(resp => {
const tempData = resp.data;
this.$refs.routeHandControl.doShow(step, this.selected, tempData);
});
this.$refs.routeHandControl.doShow(operate, this.selected, this.getRouteList(this.selected));
}
});
}

View File

@ -75,6 +75,11 @@ export default {
label: this.$t('menu.menuStation.allATSAutoControl'),
handler: this.atsAutoControlALL,
cmdType: CMD.Station.CMD_STATION_OPEN_AUTO_SETTING
},
{
label: this.$t('menu.menuStation.execKeyOperationTest'),
handler: this.execKeyOperationTest,
cmdType: CMD.Station.CMD_STATION_KEY_OPERATION_TEST
}
// {
// label: this.$t('menu.menuStation.execKeyOperationTest'),
@ -126,30 +131,22 @@ export default {
},
initMenu() {
this.menu = [];
if (this.selected.concentrateStationCode == this.selected.code) {
//
// this.menu = MenuContextHandler.menuFiltration(this.menuNormal);
this.menu = MenuContextHandler.covert(this.menuNormal);
if (this.operatemode === OperateMode.ADMIN) {
this.menu = [...this.menu, ...this.menuForce];
}
}
if (this.selected.centralized) {
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = [...this.menuForce];
}
}
// this.menu = MenuContextHandler.covert(this.menu);
},
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) {
@ -260,10 +257,10 @@ export default {
code: `${this.selected.code}`,
operation: OperationEvent.Station.execKeyOperationTest.menu.operation,
param: {
Station_Code: `${this.selected.code}`
stationCode: this.selected.code
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.stationCmdControl.doShow(step, this.selected);
@ -277,10 +274,10 @@ export default {
code: `${this.selected.code}`,
operation: OperationEvent.Station.humanControlALL.menu.operation,
param: {
Station_Code: `${this.selected.code}`
stationCode: this.selected.code
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.stationHumanControlAll.doShow(step);
@ -294,10 +291,10 @@ export default {
code: `${this.selected.code}`,
operation: OperationEvent.Station.atsAutoControlALL.menu.operation,
param: {
Station_Code: `${this.selected.code}`
stationCode: this.selected.code
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.stationSetRouteControlAll.doShow(step, this.selected);

View File

@ -236,211 +236,90 @@ export default {
},
//
setDetainTrain() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.StationStand.setDetainTrain.menu.operation,
param: {
StationStand_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
commitOperate(menuOperate.StationStand.setDetainTrain, { standCode: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.standControl.doShow(step, this.selected);
this.$refs.standControl.doShow(operate, this.selected);
}
});
},
//
cancelDetainTrain() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation,
param: {
StationStand_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
commitOperate(menuOperate.StationStand.cancelDetainTrain, { standCode: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.standControl.doShow(step, this.selected);
this.$refs.standControl.doShow(operate, this.selected);
}
});
},
//
cancelDetainTrainForce() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.StationStand.cancelDetainTrainForce.menu.operation,
param: {
StationStand_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
commitOperate(menuOperate.StationStand.cancelDetainTrainForce, { standCode: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.standControl.doShow(step, this.selected);
this.$refs.standControl.doShow(operate, this.selected);
}
});
},
// 线
cancelDetainTrainAll() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.StationStand.cancelDetainTrainAll.menu.operation,
param: {
StationStand_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
commitOperate(menuOperate.StationStand.cancelDetainTrainAll, { standCode: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.standDetainTrainAll.doShow(step, this.selected);
this.$refs.standDetainTrainAll.doShow(operate, this.selected);
}
});
},
//
setJumpStop() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.StationStand.setJumpStop.menu.operation,
param: {
StationStand_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
commitOperate(menuOperate.StationStand.setJumpStop, { standCode: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.standControl.doShow(step, this.selected);
this.$refs.standControl.doShow(operate, this.selected);
}
});
},
//
cancelJumpStop() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.StationStand.cancelJumpStop.menu.operation,
param: {
StationStand_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
commitOperate(menuOperate.StationStand.cancelJumpStop, { standCode: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.standControl.doShow(step, this.selected);
this.$refs.standControl.doShow(operate, this.selected);
}
});
},
//
setStopTime() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.StationStand.setStopTime.menu.operation,
param: {
StationStand_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid, response }) => {
commitOperate(menuOperate.StationStand.setStopTime, { standCode: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
Handler.execute(CMD.Stand.CMD_STAND_VIEW_STATUS, {StationStand_Code: `${this.selected.code}`}).then(resp => {
const tempData = resp.data;
this.$refs.standStopTime.doShow(step, this.selected, tempData);
});
this.$refs.standStopTime.doShow(operate, this.selected);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
});
},
//
setRunLevel() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.StationStand.setRunLevel.menu.operation,
param: {
StationStand_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid, response }) => {
commitOperate(menuOperate.StationStand.setRunLevel, { standCode: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
Handler.execute(CMD.Stand.CMD_STAND_VIEW_STATUS, {StationStand_Code: `${this.selected.code}`}).then(resp => {
const tempData = resp.data;
this.$refs.standRunLevel.doShow(step, this.selected, tempData);
});
this.$refs.standRunLevel.doShow(operate, this.selected);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
});
},
//
earlyDeparture() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.StationStand.earlyDeparture.menu.operation,
param: {
StationStand_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
commitOperate(menuOperate.StationStand.earlyDeparture, { standCode: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.standControl.doShow(step, this.selected);
this.$refs.standControl.doShow(operate, this.selected);
}
});
},
//
setBackStrategy() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.StationStand.setBackStrategy.menu.operation,
param: {
StationStand_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid, response }) => {
commitOperate(menuOperate.StationStand.setBackStrategy, { standCode: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
Handler.execute(CMD.Stand.CMD_STAND_VIEW_STATUS, {StationStand_Code: `${this.selected.code}`}).then(resp => {
const tempData = resp.data;
this.$refs.standBackStrategy.doShow(step, this.selected, tempData);
});
this.$refs.standBackStrategy.doShow(operate, this.selected);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
});
},
//
detail() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.StationStand.detail.menu.operation,
param: {
StationStand_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid, response }) => {
commitOperate(menuOperate.StationStand.detail, { standCode: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
Handler.execute(CMD.Stand.CMD_STAND_VIEW_STATUS, {StationStand_Code: `${this.selected.code}`}).then(resp => {
const tempData = resp.data;
this.$refs.standDetail.doShow(step, this.selected, tempData);
});
this.$refs.standDetail.doShow(operate, this.selected);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
});
}
}

View File

@ -46,67 +46,56 @@ export default {
{
label: this.$t('menu.menuSwitch.switchLock'),
handler: this.lock,
auth: { station: true, center: false },
cmdType:CMD.Switch.CMD_SWITCH_SINGLE_LOCK
},
{
label: this.$t('menu.menuSwitch.switchUnlock'),
handler: this.unlock,
auth: { station: true, center: false },
cmdType:CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
},
{
label: this.$t('menu.menuSwitch.switchSectionBlockade'),
handler: this.block,
auth: { station: true, center: false },
cmdType:CMD.Switch.CMD_SWITCH_BLOCK
},
{
label: this.$t('menu.menuSwitch.switchSectionUnblock'),
handler: this.unblock,
auth: { station: true, center: false },
cmdType:CMD.Switch.CMD_SWITCH_UNBLOCK
},
{
label: this.$t('menu.menuSwitch.switchTurnout'),
handler: this.switchTurnout,
auth: { station: true, center: false },
cmdType:CMD.Switch.CMD_SWITCH_TURN
},
{
label: this.$t('menu.menuSwitch.switchSectionFaultUnlock'),
handler: this.fault,
auth: { station: true, center: false },
cmdType:CMD.Switch.CMD_SWITCH_FAULT_UNLOCK
},
{
label: this.$t('menu.menuSwitch.switchSectionAxisPreReset'),
handler: this.axlePreReset,
auth: { station: true, center: false },
cmdType:CMD.Switch.CMD_SWITCH_AXIS_PRE_RESET
},
{
label: this.$t('menu.menuSwitch.sectionResection'),
handler: this.split,
auth: { station: true, center: false },
cmdType:CMD.Switch.CMD_SWITCH_CUT_OFF
},
{
label: this.$t('menu.menuSwitch.sectionActive'),
handler: this.active,
auth: { station: true, center: false },
cmdType:CMD.Switch.CMD_SWITCH_ACTIVE
},
{
label: this.$t('menu.menuSwitch.switchSectionSetSpeedLimit'),
handler: this.setSpeed,
auth: { station: true, center: false },
cmdType:CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED
},
{
label: this.$t('menu.menuSwitch.switchSectionCancelSpeedLimit'),
handler: this.cancelSpeed,
auth: { station: true, center: false },
cmdType:CMD.Switch.CMD_SWITCH_CANCEL_LIMIT_SPEED
}
],
@ -114,49 +103,41 @@ export default {
{
label: this.$t('menu.menuSwitch.switchLock'),
handler: this.lock,
auth: { station: false, center: true },
cmdType:CMD.Switch.CMD_SWITCH_SINGLE_LOCK
},
{
label: this.$t('menu.menuSwitch.switchUnlock'),
handler: this.unlock,
auth: { station: false, center: true },
cmdType:CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
},
{
label: this.$t('menu.menuSwitch.switchSectionBlockade'),
handler: this.block,
auth: { station: false, center: true },
cmdType:CMD.Switch.CMD_SWITCH_BLOCK
},
{
label: this.$t('menu.menuSwitch.switchSectionUnblock'),
handler: this.unblock,
auth: { station: false, center: true },
cmdType:CMD.Switch.CMD_SWITCH_UNBLOCK
},
{
label: this.$t('menu.menuSwitch.switchTurnout'),
handler: this.switchTurnout,
auth: { station: false, center: true },
cmdType:CMD.Switch.CMD_SWITCH_TURN
},
{
label: this.$t('menu.menuSwitch.switchSectionFaultUnlock'),
handler: this.fault,
auth: { station: false, center: true },
cmdType:CMD.Switch.CMD_SWITCH_FAULT_UNLOCK
},
{
label: this.$t('menu.menuSwitch.sectionResection'),
handler: this.split,
auth: { station: true, center: true },
cmdType:CMD.Switch.CMD_SWITCH_CUT_OFF
},
{
label: this.$t('menu.menuSwitch.sectionActive'),
handler: this.active,
auth: { station: true, center: true },
cmdType:CMD.Switch.CMD_SWITCH_ACTIVE
},
{
@ -213,7 +194,6 @@ export default {
initMenu() {
//
this.menu = MenuContextHandler.covert(this.menuNormal);
// this.menu = MenuContextHandler.menuFiltration(this.menuNormal);
if (this.operatemode === OperateMode.ADMIN) {
this.menu = [...this.menu, ...this.menuForce];
}
@ -222,8 +202,6 @@ export default {
if (this.operatemode === OperateMode.FAULT) {
this.menu = this.menuForce;
}
// this.menu = MenuContextHandler.covert(this.menu);
},
doShow(point) {
this.clickEvent();
@ -255,198 +233,97 @@ export default {
},
//
lock() {
const step = {
start: true,
operation: OperationEvent.Switch.lock.menu.operation,
param: {
Switch_Code: this.selected.code
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
commitOperate(menuOperate.Switch.lock, { switchCode: this.selected.code}, 0).then(({valid, operate}) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.switchControl.doShow(step, this.selected);
this.$refs.switchControl.doShow(operate, this.selected);
}
});
},
//
unlock() {
const step = {
start: true,
operation: OperationEvent.Switch.unlock.menu.operation,
param: {
Switch_Code: this.selected.code
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
commitOperate(menuOperate.Switch.unlock, { switchCode: this.selected.code}, 0).then(({valid, operate}) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.switchCmdControl.doShow(step, this.selected);
this.$refs.switchCmdControl.doShow(operate, this.selected);
}
});
},
//
block() {
const step = {
start: true,
operation: OperationEvent.Switch.block.menu.operation,
param: {
Switch_Code: this.selected.code
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
commitOperate(menuOperate.Switch.block, { switchCode: this.selected.code}, 0).then(({valid, operate}) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.switchControl.doShow(step, this.selected);
this.$refs.switchControl.doShow(operate, this.selected);
}
});
},
//
unblock() {
const step = {
start: true,
operation: OperationEvent.Switch.unblock.menu.operation,
param: {
Switch_Code: this.selected.code
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
commitOperate(menuOperate.Switch.unblock, { switchCode: this.selected.code}, 0).then(({valid, operate}) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.switchCmdControl.doShow(step, this.selected);
this.$refs.switchCmdControl.doShow(operate, this.selected);
}
});
},
//
switchTurnoutForce() {
const step = {
start: true,
operation: OperationEvent.Switch.turnoutForce.menu.operation,
param: {
Switch_Code: this.selected.code
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
commitOperate(menuOperate.Switch.turnoutForce, { switchCode: this.selected.code}, 0).then(({valid, operate}) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.switchControl.doShow(step, this.selected);
this.$refs.switchControl.doShow(operate, this.selected);
}
});
},
//
switchTurnout() {
const step = {
start: true,
operation: OperationEvent.Switch.turnout.menu.operation,
param: {
Switch_Code: this.selected.code
}
};
if (step.operation) {
this.$store.dispatch('training/next', step).then(({ valid }) => {
commitOperate(menuOperate.Switch.turnout, { switchCode: this.selected.code}, 0).then(({valid, operate}) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.switchControl.doShow(step, this.selected);
this.$refs.switchControl.doShow(operate, this.selected);
}
});
}
},
//
fault() {
const step = {
start: true,
operation: OperationEvent.Switch.fault.menu.operation,
param: {
Switch_Code: this.selected.code
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
commitOperate(menuOperate.Switch.fault, { switchCode: this.selected.code}, 0).then(({valid, operate}) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.switchCmdControl.doShow(step, this.selected);
this.$refs.switchCmdControl.doShow(operate, this.selected);
}
});
},
//
axlePreReset() {
const step = {
start: true,
operation: OperationEvent.Switch.axlePreReset.menu.operation,
param: {
Switch_Code: this.selected.code
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
commitOperate(menuOperate.Switch.axlePreReset, { switchCode: this.selected.code}, 0).then(({valid, operate}) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.switchCmdControl.doShow(step, this.selected);
this.$refs.switchCmdControl.doShow(operate, this.selected);
}
});
},
//
split() {
const step = {
start: true,
operation: OperationEvent.Switch.split.menu.operation,
param: {
Switch_Code: this.selected.code
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
commitOperate(menuOperate.Switch.split, { switchCode: this.selected.code}, 0).then(({valid, operate}) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.switchControl.doShow(step, this.selected);
this.$refs.switchControl.doShow(operate, this.selected);
}
});
},
//
active() {
const step = {
start: true,
operation: OperationEvent.Switch.active.menu.operation,
param: {
Switch_Code: this.selected.code
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
commitOperate(menuOperate.Switch.active, { switchCode: this.selected.code}, 0).then(({valid, operate}) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.switchControl.doShow(step, this.selected);
this.$refs.switchControl.doShow(operate, this.selected);
}
});
},
//
setSpeed() {
const step = {
start: true,
operation: OperationEvent.Switch.setSpeed.menu.operation,
param: {
Switch_Code: this.selected.code
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
commitOperate(menuOperate.Switch.setSpeed, { switchCode: this.selected.code}, 0).then(({valid, operate}) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.speedCmdControl.doShow(step, this.selected);
this.$refs.speedCmdControl.doShow(operate, this.selected);
}
});
},
//
cancelSpeed() {
const step = {
start: true,
operation: OperationEvent.Switch.cancelSpeed.menu.operation,
cmdType: CMD.Switch.CMD_CANCEL_SPEED,
param: {
Switch_Code: this.selected.code
}
};
this.$store.dispatch('training/next', step).then(({ valid, response }) => {
commitOperate(menuOperate.Switch.cancelSpeed, { switchCode: this.selected.code}, 0).then(({valid, operate}) => {
if (valid) {
const tempData = response.data;
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.speedCmdControl.doShow(step, this.selected, tempData);
this.$refs.speedCmdControl.doShow(operate, this.selected);
}
});
}

View File

@ -49,60 +49,54 @@ export default {
menuNormal: {
Local: [],
Center: [
// {
// label: this.$t('menu.menuTrain.addTrainId'),
// handler: this.addTrainId,
// auth: { station: true, center: true },
// cmdType:CMD.Train.CMD_SWITCH_REMOVE_FAULT
// },
// {
// label: this.$t('menu.menuTrain.deleteTrainId'),
// handler: this.delTrainId,
// auth: { station: true, center: true },
// cmdType:CMD.Train.CMD_SWITCH_REMOVE_FAULT
// },
// {
// label: this.$t('menu.menuTrain.editTrainId'),
// handler: this.editTrainId,
// auth: { station: true, center: true },
// cmdType:CMD.Train.CMD_SWITCH_REMOVE_FAULT
// },
// {
// label: this.$t('menu.menuTrain.editTrainNo'),
// handler: this.editTrainNo,
// auth: { station: true, center: true },
// cmdType:CMD.Train.CMD_SWITCH_REMOVE_FAULT
// },
// {
// label: this.$t('menu.menuTrain.moveTrainId'),
// handler: this.moveTrainId,
// auth: { station: true, center: true },
// cmdType:CMD.Train.CMD_SWITCH_REMOVE_FAULT
// },
// {
// label: this.$t('menu.menuTrain.switchTrainId'),
// handler: this.switchTrainId,
// auth: { station: true, center: true },
// cmdType:CMD.Train.CMD_SWITCH_REMOVE_FAULT
// }
{
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
}
]
},
menuForce: [
{
label: this.$t('menu.menuTrain.setCommunicationFault'),
handler: this.setStoppage,
handler: this.undeveloped,
cmdType:CMD.Train.CMD_TRAIN_ADD_FAULT
},
{
label: this.$t('menu.menuTrain.cancelCommunicationFault'),
handler: this.cancelStoppage,
handler: this.undeveloped,
cmdType:CMD.Train.CMD_TRAIN_REMOVE_FAULT
}
],
menuSpeed: [
{
label: this.$t('menu.menuTrain.confirmRunToFrontStation'),
handler: this.limitSpeed,
handler: this.undeveloped,
cmdType:CMD.Train.CMD_TRAIN_MANUAL_LIMIT_DRIVE
}
]
@ -133,6 +127,14 @@ export default {
self.doClose();
};
},
undeveloped() {
this.doClose();
this.$alert('实现中......', '提示', {
confirmButtonText: '确定',
callback: action => {
}
});
},
initMenu() {
//
// this.menu = MenuContextHandler.menuFiltration(this.menuNormal);
@ -145,8 +147,6 @@ export default {
if (this.operatemode === OperateMode.FAULT) {
this.menu = [...this.menuForce, ...this.menuSpeed];
}
// this.menu = MenuContextHandler.covert(this.menu);
},
doShow(point) {
this.clickEvent();
@ -164,45 +164,44 @@ export default {
},
//
setStoppage() {
const step = {
start: true,
operation: OperationEvent.Train.stoppage.menu.operation,
cmdType: CMD.Train.CMD_STOPPAGE,
param: {
code: this.selected.code
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(step);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
});
// const step = {
// start: true,
// operation: OperationEvent.Train.stoppage.menu.operation,
// cmdType: CMD.Train.CMD_STOPPAGE,
// param: {
// code: this.selected.code
// }
// };
// this.$store.dispatch('training/next', step).then(({ valid }) => {
// if (valid) {
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
// } else {
// this.$refs.noticeInfo.doShow(step);
// }
// }).catch(() => {
// this.$refs.noticeInfo.doShow(step);
// });
},
//
cancelStoppage() {
const step = {
start: true,
operation: OperationEvent.Train.cancelStoppage.menu.operation,
cmdType: CMD.Train.CMD_CANCEL_STOPPAGE,
param: {
code: this.selected.code
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(step);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
});
// const step = {
// start: true,
//
// operation: OperationEvent.Train.cancelStoppage.menu.operation,
// cmdType: CMD.Train.CMD_CANCEL_STOPPAGE,
// param: {
// code: this.selected.code
// }
// };
// this.$store.dispatch('training/next', step).then(({ valid }) => {
// if (valid) {
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
// } else {
// this.$refs.noticeInfo.doShow(step);
// }
// }).catch(() => {
// this.$refs.noticeInfo.doShow(step);
// });
},
//
limitSpeed() {
@ -263,13 +262,12 @@ export default {
editTrainId() {
const step = {
start: true,
operation: OperationEvent.Train.editTrainId.menu.operation,
param: {
code: this.selected.code
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainControl.doShow(step, this.selected);

View File

@ -41,6 +41,11 @@ export const menuOperate = {
operation: OperationEvent.Section.setSpeed.menu.operation,
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
},
cancelSpeed: {
// 取消限速
operation: OperationEvent.Section.cancelSpeed.menu.operation,
cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED
},
fault:{
// 区段故障解锁
operation: OperationEvent.Section.fault.menu.operation,
@ -148,11 +153,21 @@ export const menuOperate = {
operation: OperationEvent.Switch.unblock.menu.operation,
cmdType: CMD.Switch.CMD_SWITCH_UNBLOCK
},
turnoutForce: {
// 道岔强扳
operation: OperationEvent.Switch.turnoutForce.menu.operation,
cmdType: CMD.Switch.CMD_SWITCH_FORCE_TURN
},
turnout:{
// 道岔转动
operation: OperationEvent.Switch.turnout.menu.operation,
cmdType:CMD.Switch.CMD_SWITCH_TURN
},
fault: {
// 故障解锁
operation: OperationEvent.Switch.fault.menu.operation,
cmdType: CMD.Switch.CMD_SWITCH_FAULT_UNLOCK
},
split:{
// 区段切除
operation: OperationEvent.Switch.split.menu.operation,
@ -168,10 +183,20 @@ export const menuOperate = {
operation: OperationEvent.Switch.setSpeed.menu.operation,
cmdType:CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED
},
cancelSpeed: {
// 取消临时限速
operation: OperationEvent.Switch.cancelSpeed.menu.operation,
cmdType:CMD.Switch.CMD_SWITCH_CANCEL_LIMIT_SPEED
},
alxeEffective:{
// 确认计轴有效
operation: OperationEvent.Switch.alxeEffective.menu.operation,
cmdType: CMD.Switch.CMD_SWITCH_COMFIRMATION_AXLE
},
axlePreReset:{
// 计轴预复位
operation: OperationEvent.Switch.axlePreReset.menu.operation,
cmdType: CMD.Switch.CMD_SWITCH_AXIS_PRE_RESET
}
},
StationStand:{
@ -185,6 +210,16 @@ export const menuOperate = {
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation,
cmdType: CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN
},
cancelDetainTrainForce: {
// 强制取消扣车
operation: OperationEvent.StationStand.cancelDetainTrainForce.menu.operation,
cmdType: CMD.Stand.CMD_STAND_FORCE_CANCEL_HOLD_TRAIN
},
cancelDetainTrainAll: {
// 全线取消扣车
operation: OperationEvent.StationStand.cancelDetainTrainAll.menu.operation,
cmdType: CMD.Stand.CMD_STAND_WHOLE_LINE_CANCEL_HOLD_TRAIN
},
setDetainTrainAuto:{
// 区间列车数量限制
operation: OperationEvent.StationStand.setDetainTrainAuto.menu.operation,
@ -257,6 +292,16 @@ export const menuOperate = {
cmdType:CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL
}
},
TrainWindow: {
editTrainId: {
operation: OperationEvent.Train.editTrainId.menu.operation,
cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
},
addTrainId: {
operation: OperationEvent.Train.addTrainId.menu.operation,
cmdType: ''
}
},
Common: {
setFault: {
operation: OperationEvent.MixinCommand.stoppage.menu.operation,

View File

@ -1,142 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="haerbin-01__systerm two-confirmation"
:title="$t('menu.menuChildDialog.secondaryConfirmation')"
:visible.sync="show"
width="360px"
:before-close="doClose"
:show-close="false"
: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 class="button-group">
<el-col :span="10" :offset="3">
<el-button :id="show? domIdConfirm: ''" :loading="loading" @click="commit">{{ $t('menu.menuChildDialog.confirm') }}</el-button>
</el-col>
<el-col :span="6" :offset="4">
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.menuChildDialog.close') }}</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '../../dialog/childDialog/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'TwoConfirmation',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
operate: '',
timer: null,
domIdConfirm: ''
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
},
messages() {
if (this.operate) {
return this.operate.messages;
}
return [];
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate) {
this.domIdConfirm = '';
if (OperationHandler.checkOperationIsCurrentOperate(operate.operation, OperationEvent.StationControl.forcedStationControl)) {
this.domIdConfirm = OperationEvent.StationControl.forcedStationControl.confirm.domId;
} else if (OperationHandler.checkOperationIsCurrentOperate(operate.operation, OperationEvent.StationControl.requestStationControl)) {
this.domIdConfirm = OperationEvent.StationControl.requestStationControl.confirm.domId;
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)) {
this.domIdConfirm = OperationEvent.StationControl.requestCentralControl.confirm.domId;
}
this.operate = operate || {};
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
cancel() {
const operate = {
operation: OperationEvent.Command.close.confirm.operation
};
this.$emit('setOperate', { selection: this.operate.selection, cancel: true });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.doClose();
}
});
},
commit() {
if (this.operate) {
this.loading = true;
(this.operate.selection || []).forEach(elem => {
const operate = {
val: elem.code,
param: {
ControlMode_Code: elem.code
}
};
if (OperationHandler.checkOperationIsCurrentOperate(this.operate.operation, OperationEvent.StationControl.forcedStationControl)) {
operate.operation = OperationEvent.StationControl.forcedStationControl.confirm.operation;
operate.cmdType = CMD.ControlConvertMenu.CMD_CM_FORCE_STATION_CONTROL;
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operate.operation, OperationEvent.StationControl.requestStationControl)) {
operate.operation = OperationEvent.StationControl.requestStationControl.confirm.operation;
operate.cmdType = CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL;
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operate.operation, OperationEvent.StationControl.requestCentralControl)) {
operate.operation = OperationEvent.StationControl.requestCentralControl.confirm.operation;
operate.cmdType = CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_CENTER_CONTROL;
}
this.doClose();
this.$emit('setOperate', { selection: this.operate.selection, commit: true });
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
});
this.loading = false;
}
}
}
};
</script>

View File

@ -1,172 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="haerbin-01__systerm user-add"
:title="title"
:visible.sync="show"
width="420px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
append-to-body
>
<div style="padding: 15px 40px; border: 1px double lightgray; margin: 20px 10px; ">
<el-form ref="form" size="small" label-width="90px" :model="model" label-position="left" :rules="rules">
<el-form-item :label="$t('menu.menuChildDialog.jobNumber')" prop="jobNumber">
<el-input v-model="model.jobNumber" />
</el-form-item>
<el-form-item :label="$t('menu.menuChildDialog.userName')" prop="userName">
<el-input v-model="model.userName" />
</el-form-item>
<el-form-item :label="$t('menu.menuChildDialog.password')" prop="password">
<el-input v-model="model.password" type="password" />
</el-form-item>
<el-form-item :label="$t('menu.menuChildDialog.confirmPassword')" prop="confirm">
<el-input v-model="model.confirm" type="password" />
</el-form-item>
</el-form>
</div>
<el-row justify="center" class="button-group">
<el-col :span="8" :offset="6">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('menu.menuChildDialog.determine') }}</el-button>
</el-col>
<el-col :span="8" :offset="0">
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.menuChildDialog.cancel') }}</el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'UserAdd',
components: {
},
data() {
return {
operate: {},
operation: null,
dialogShow: false,
loading: false,
model: {
type: 'ADD',
jobNumber: '',
userName: '',
password: '',
confirm: ''
},
rules: {
jobNumber: [
{ required: true, message: this.$t('menu.menuChildDialog.inputJobNumber'), trigger: 'blur' }
],
userName: [
{ required: true, message: this.$t('menu.menuChildDialog.inputUserName'), trigger: 'blur' }
],
password: [
{ required: true, message: this.$t('menu.menuChildDialog.inputPassword'), trigger: 'change' }
],
confirm: [
{ required: true, message: this.$t('menu.menuChildDialog.inputPasswordAgain'), trigger: 'change' }
]
}
};
},
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.Command.close.confirm.domId : '';
},
title() {
return this.$t('menu.menuChildDialog.addUser');
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate) {
//
if (!this.dialogShow) {
this.loading = false;
this.operate = operate || {};
this.operation = operate.operation;
this.$nextTick(() => {
this.$refs.form.resetFields();
});
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.close.confirm.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
if (this.model.password === this.model.confirm) {
this.doClose();
this.$emit('operateUser', this.model);
} else {
this.$messageBox(this.$t('menu.menuChildDialog.passwordInconsistent'));
}
}
});
} else {
return false;
}
});
},
cancel() {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); this.model; });
}
}
};
</script>
<style scoped>
.haerbin-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -10px;
padding: 0 5px;
background-color: #F0F0F0;
}
</style>

View File

@ -1,143 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="haerbin-01__systerm user-delete"
:title="title"
:visible.sync="show"
width="260px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
append-to-body
>
<div style="padding-left: 10px; padding-bottom: 10px">
<i class="el-icon-info" />
<template v-for="(message,index) in messages">
<span :key="index">{{ message }}</span>
</template>
</div>
<el-row justify="center" class="button-group">
<el-col :span="8" :offset="3">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('menu.menuChildDialog.determine') }}</el-button>
</el-col>
<el-col :span="8" :offset="2">
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.menuChildDialog.cancel') }}</el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'UserDelete',
components: {
},
data() {
return {
operate: {},
messages: [],
model: {
type: 'DELETE',
jobNumber: '',
userName: ''
},
operation: null,
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.Command.close.confirm.domId : '';
},
title() {
return this.$t('menu.menuChildDialog.deleteUser');
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate, selected) {
//
if (!this.dialogShow) {
this.loading = false;
this.operate = operate || {};
this.operation = operate.operation;
this.messages = operate.messages;
this.model.userName = '';
this.model.jobNumber = '';
if (selected) {
this.model.userName = selected.userName;
this.model.jobNumber = selected.jobNumber;
}
}
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.model.userName && this.model.jobNumber) {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.close.confirm.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
this.$emit('operateUser', this.model);
}
});
} else {
this.$messageBox(this.$t('menu.menuChildDialog.selectTips'));
}
},
cancel() {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', 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: -10px;
padding: 0 5px;
background-color: #F0F0F0;
}
</style>

View File

@ -1,189 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="haerbin-01__systerm user-edit"
:title="title"
:visible.sync="show"
width="420px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
append-to-body
>
<div style="padding: 15px 40px; border: 1px double lightgray; margin: 20px 10px; ">
<el-form ref="form" size="small" label-width="90px" :model="model" label-position="left" :rules="rules">
<el-form-item :label="$t('menu.menuChildDialog.jobNumber')" prop="jobNumber">
<el-input v-model="model.jobNumber" disabled />
</el-form-item>
<el-form-item :label="$t('menu.menuChildDialog.userName')" prop="userName">
<el-input v-model="model.userName" disabled />
</el-form-item>
<el-form-item :label="$t('menu.menuChildDialog.originalPassword')" prop="oldPassword">
<el-input v-model="model.oldPassword" type="password" />
</el-form-item>
<el-form-item :label="$t('menu.menuChildDialog.password')" prop="password">
<el-input v-model="model.password" type="password" />
</el-form-item>
<el-form-item :label="$t('menu.menuChildDialog.confirmPassword')" prop="confirm">
<el-input v-model="model.confirm" type="password" />
</el-form-item>
</el-form>
</div>
<el-row justify="center" class="button-group">
<el-col :span="8" :offset="6">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('menu.menuChildDialog.determine') }}</el-button>
</el-col>
<el-col :span="8" :offset="0">
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.menuChildDialog.cancel') }}</el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'UserEdit',
components: {
},
data() {
return {
operate: {},
selected: {},
operation: null,
dialogShow: false,
loading: false,
model: {
type: 'EDIT',
jobNumber: '',
userName: '',
oldPassword: '',
password: '',
confirm: ''
},
rules: {
jobNumber: [
{ required: true, message: this.$t('menu.menuChildDialog.inputJobNumber'), trigger: 'blur' }
],
userName: [
{ required: true, message: this.$t('menu.menuChildDialog.inputUserName'), trigger: 'blur' }
],
oldPassword: [
{ required: true, message: this.$t('menu.menuChildDialog.inputOriginal'), trigger: 'change' }
],
password: [
{ required: true, message: this.$t('menu.menuChildDialog.inputNewPassword'), trigger: 'change' }
],
confirm: [
{ required: true, message: this.$t('menu.menuChildDialog.inputNewAgain'), trigger: 'change' }
]
}
};
},
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.Command.close.confirm.domId : '';
},
title() {
return this.$t('menu.menuChildDialog.userEditPage');
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate, selected) {
//
if (!this.dialogShow) {
this.loading = false;
this.operate = operate || {};
this.operation = operate.operation;
this.$nextTick(() => {
this.$refs.form.resetFields();
this.selected = selected;
if (selected) {
this.model.jobNumber = selected.jobNumber;
this.model.userName = selected.userName;
}
});
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.close.confirm.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
if (this.selected.password !== this.model.oldPassword) {
this.$messageBox(this.$t('menu.menuChildDialog.originalPasswordError'));
} else if (this.model.password !== this.model.confirm) {
this.$messageBox(this.$t('menu.menuChildDialog.passwordError'));
} else if (this.model.oldPassword === this.model.password) {
this.$messageBox(this.$t('menu.menuChildDialog.passwordSame'));
} else {
this.doClose();
this.$emit('operateUser', this.model);
}
}
});
} else {
return false;
}
});
},
cancel() {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', 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: -10px;
padding: 0 5px;
background-color: #F0F0F0;
}
</style>

View File

@ -1,140 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="haerbin-01__systerm manage-user"
:title="title"
:visible.sync="show"
width="600px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div style="height: 70px;">
<div style="position: relative; left: 10px;" />
<div style="position: relative; left: 80px;">
<div style="width:100%">
<span style="padding-left: 60px">{{ $t('menu.menuDialog.versionName') }}</span>
<el-button
:id="domIdConfirm"
style="position: absolute; right: 95px;"
type="primary"
:loading="loading"
@click="commit"
>{{ $t('menu.menuDialog.confirm') }}</el-button>
</div>
<div style="width:100%; padding-top: 20px">
<span> {{ $t('menu.menuDialog.copyright') }}</span>
</div>
</div>
</div>
<div style="padding: 10px; margin: 5px; ">
<el-table :data="tableData" style="width: 100%;" height="400">
<el-table-column prop="moduleName" :label="$t('menu.menuDialog.moduleName')" width="180" />
<el-table-column prop="version" :label="$t('menu.menuDialog.version')" width="180" />
<el-table-column prop="updateDate" :label="$t('menu.menuDialog.modifyDate')" />
</el-table>
</div>
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'ManageUser',
data() {
return {
tableData: [
{
moduleName: this.$t('menu.menuDialog.mainProgramVersion'),
version: '123',
updateDate: '123'
}
],
operate: {},
operation: null,
dialogShow: false,
loading: false,
selected: null
};
},
computed: {
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.menu.domId : '';
},
title() {
return this.$t('menu.menuDialog.about');
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate) {
//
if (!this.dialogShow) {
this.loading = false;
this.operate = operate || {};
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 = {
type: this.operate.type,
operation: OperationEvent.Command.close.menu.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
});
},
cancel() {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', 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: -10px;
padding: 0 5px;
background-color: #F0F0F0;
}
</style>

View File

@ -1,309 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="haerbin-01__systerm manage-user"
:title="title"
:visible.sync="show"
width="420px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div style="padding: 5px 5px; border: 1px double lightgray; margin: 20px 0px; ">
<span class="base-label">{{ $t('menu.menuDialog.userList') }}</span>
<el-row>
<el-col :span="18">
<el-table
ref="multipleTable"
:data="tableData"
border
row-key="code"
style="width: 100%"
height="450"
center
size="mini"
highlight-current-row
@row-click="chooseUser"
>
<el-table-column prop="jobNumber" :label="$t('menu.menuDialog.jobNumber')" width="120">
<template slot-scope="scope">
<span>{{ scope.row.jobNumber }}</span>
</template>
</el-table-column>
<el-table-column prop="userName" :label="$t('menu.menuDialog.userName')">
<template slot-scope="scope">
<span>{{ scope.row.userName }}</span>
</template>
</el-table-column>
<el-table-column width="20" />
</el-table>
</el-col>
<el-col :span="4">
<el-button :id="domIdFreshUser" style="margin-top: 140px; margin-left: 10px;" @click="freshUser">{{ $t('menu.menuDialog.refresh') }}
</el-button>
<el-button :id="domIdAddUser" style="margin-top: 30px; margin-left: 10px;" @click="addUser">{{ $t('menu.menuDialog.add') }}
</el-button>
<el-button :id="domIdEditUser" style="margin-top: 30px; margin-left: 10px;" @click="editUser">{{ $t('menu.menuDialog.modify') }}
</el-button>
<el-button :id="domIdDelUser" style="margin-top: 30px; margin-left: 10px;" @click="delUser">{{ $t('menu.menuDialog.delete') }}
</el-button>
</el-col>
</el-row>
</div>
<el-row justify="center" class="button-group">
<el-col :span="8" :offset="6">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('menu.menuDialog.confirm') }}</el-button>
</el-col>
<el-col :span="8" :offset="0">
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.menuDialog.cancel') }}</el-button>
</el-col>
</el-row>
<user-add ref="userAdd" @operateUser="operateUser" />
<user-edit ref="userEdit" @operateUser="operateUser" />
<user-delete ref="userDelete" @operateUser="operateUser" />
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import UserAdd from './childDialog/userAdd';
import UserEdit from './childDialog/userEdit';
import UserDelete from './childDialog/userDelete';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'ManageUser',
components: {
UserAdd,
UserEdit,
UserDelete
},
data() {
return {
tableData: [],
operate: {},
operation: null,
dialogShow: false,
loading: false,
selected: null
};
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdAddUser() {
return this.dialogShow ? OperationEvent.Command.manage.addUser.domId : '';
},
domIdEditUser() {
return this.dialogShow ? OperationEvent.Command.manage.editUser.domId : '';
},
domIdDelUser() {
return this.dialogShow ? OperationEvent.Command.manage.delUser.domId : '';
},
domIdFreshUser() {
return this.dialogShow ? OperationEvent.Command.manage.freshUser.domId : '';
},
domIdChooseUser() {
return this.dialogShow ? OperationEvent.Command.manage.chooseUser.domId : '';
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.close.menu.domId : '';
},
title() {
return this.$t('menu.menuDialog.userManage');
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate) {
//
if (!this.dialogShow) {
this.loading = false;
this.operate = operate || {};
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');
},
//
addUser() {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.manage.addUser.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.$refs.userAdd.doShow(operate);
}
}).catch(() => {
this.loading = false;
});
},
//
editUser() {
if (this.selected) {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.manage.editUser.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.$refs.userEdit.doShow(operate, this.selected);
}
}).catch(() => {
this.loading = false;
});
} else {
this.$messageBox(this.$t('menu.menuDialog.selectUser'));
}
},
//
delUser() {
if (this.selected) {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.manage.delUser.operation,
messages: [`${this.$t('menu.menuDialog.deleteMessageOne')} ${this.selected.userName} ${this.$t('menu.menuDialog.deleteMessageTwo')}`]
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.$refs.userDelete.doShow(operate, this.selected);
}
}).catch(() => {
this.loading = false;
});
} else {
this.$messageBox(this.$t('menu.menuDialog.selectUser'));
}
},
//
freshUser() {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.manage.freshUser.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
}).catch(() => {
this.loading = false;
});
},
//
chooseUser(row) {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.manage.chooseUser.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
this.selected = row;
}).catch(() => {
this.loading = false;
});
},
commit() {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.close.menu.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
});
},
cancel() {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); });
},
//
operateUser(data) {
if (data && data.type === 'ADD') {
const index = this.tableData.indexOf(this.tableData.find(elem => { return elem.jobNumber === data.jobNumber; }));
if (index < 0) {
this.tableData.push({
jobNumber: data.jobNumber,
userName: data.userName,
password: data.password
});
} else {
this.$messageBox(this.$t('menu.menuDialog.addFail'));
}
} else if (data && data.type === 'EDIT') {
const index = this.tableData.indexOf(this.tableData.find(elem => { return elem.jobNumber === data.jobNumber; }));
if (index >= 0) {
this.tableData[index].password = data.password;
this.tableData[index].userName = data.userName;
} else {
this.$messageBox(this.$t('menu.menuDialog.modifyFail'));
}
} else if (data && data.type === 'DELETE') {
const index = this.tableData.indexOf(this.tableData.find(elem => { return elem.jobNumber === data.jobNumber; }));
if (index >= 0) {
this.tableData.splice(index, 1);
this.selected = null;
} else {
this.$messageBox(this.$t('menu.menuDialog.deleteFail'));
}
}
}
}
};
</script>
<style scoped>
.haerbin-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -10px;
padding: 0 5px;
background-color: #F0F0F0;
}
</style>

View File

@ -1,228 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="haerbin-01__systerm password-box"
:title="$t('menu.menuDialog.passwordBox')"
:visible.sync="show"
width="320px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div class="context" style="overflow:hidden">
<el-form label-width="80px" size="mini">
<el-form-item prop="username">
<span slot="label">{{ $t('menu.menuDialog.userNameLabel') }}</span>
<el-input v-model="model.username" disabled />
</el-form-item>
<el-form-item prop="password">
<span slot="label">{{ $t('menu.menuDialog.password') }}</span>
<el-input v-model="model.password" type="password" />
</el-form-item>
</el-form>
<div class="operate">
<el-button-group v-model="key" class="left" size="mini">
<el-button size="mini" @click="click(1)">1</el-button>
<el-button size="mini" @click="click(2)">2</el-button>
<el-button size="mini" @click="click(3)">3</el-button>
<el-button size="mini" @click="click(4)">4</el-button>
<el-button size="mini" @click="click(5)">5</el-button>
</el-button-group>
<el-button-group v-model="key" class="right" size="mini">
<el-button @click="esc">{{ $t('menu.menuDialog.back') }}</el-button>
</el-button-group>
<el-button-group v-model="key" class="left" size="mini">
<el-button size="mini" @click="click(6)">6</el-button>
<el-button size="mini" @click="click(7)">7</el-button>
<el-button size="mini" @click="click(8)">8</el-button>
<el-button size="mini" @click="click(9)">9</el-button>
<el-button size="mini" @click="click(0)">0</el-button>
</el-button-group>
<el-button-group v-model="key" class="right" size="mini">
<el-button @click="clr">{{ $t('menu.menuDialog.clear') }}</el-button>
</el-button-group>
</div>
</div>
<el-row class="button-group">
<el-col :span="6" :offset="4">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('menu.menuDialog.confirm') }}</el-button>
</el-col>
<el-col :span="6" :offset="4">
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.menuDialog.cancel') }}</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
export default {
name: 'PasswordBox',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
operate: null,
operation: null,
model: {
username: '',
password: ''
},
key: ''
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.close.password.domId : '';
},
domIdConfirm() {
if (this.dialogShow) {
if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl)) {
/** 强制站控*/
return OperationEvent.StationControl.forcedStationControl.passwordConfirm.domId;
}
}
return '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
loadInitData(operate) {
this.model.username = '';
this.model.password = '';
this.operate = operate || {};
this.operation = operate.operation;
this.model.username = this.$store.state.user.nickname;
},
doShow(operate) {
/** 如果不是断点激活,而是第一次显示需要初始化数据*/
if (!this.dialogShow) {
this.loadInitData(operate);
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
cancel() {
const operate = {
operation: OperationEvent.Command.close.password.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
});
},
commit() {
const operate = {
};
if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl)) {
/** 强制站控*/
operate.operation = OperationEvent.StationControl.forcedStationControl.passwordConfirm.operation;
}
if (this.model.password == '123456') {
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {
this.$emit('setLoginResult', {
operation: operate.operation,
success: valid
});
this.doClose();
}
}).catch(() => {
this.loading = false;
this.$emit('setLoginResult', {
operation: operate.operation,
success: false
});
});
} else {
this.$refs.noticeInfo.doShow(operate, [this.$t('menu.menuDialog.IncorrectPassword')]);
}
},
click(key) {
if (!this.model.password) {
this.model.password = '';
}
this.model.password += key;
},
esc() {
if (this.model.password) {
this.model.password = this.model.password.substring(0, this.model.password.length - 1);
}
},
clr() {
this.model.password = '';
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.password-box .el-form {
margin-top: 10px !important;
margin-right: 20px !important;
}
.password-box .el-form-item {
margin-bottom: 5px !important;
}
.password-box .context {
height: 170px !important;
}
.password-box .operate {
margin-top: 10px !important;
padding-bottom: 10px !important;
}
.password-box .left {
margin-left: 10px !important;
}
.password-box .left .el-button {
color: #000;
background: #F0F0F0;
text-align: center;
width: 30px !important;
}
.password-box .right {
color: #000;
margin-left: 10px !important;
background: #F0F0F0;
width: 80px !important;
}
</style>

View File

@ -1,463 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="haerbin-01__systerm station-control-convert"
:title="$t('menu.menuDialog.controlModeConversion')"
:visible.sync="show"
width="700px"
:before-close="doClose"
:show-close="true"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-table
ref="multipleTable"
:data="tableData"
border
row-key="code"
style="width: 100%"
height="250"
center
size="mini"
highlight-current-row
>
<el-table-column :id="domIdChoose" prop="check" :label="$t('menu.menuDialog.select')" width="60" style="margin-left:30px">
<template slot-scope="scope">
<el-checkbox ref="check" v-model="scope.row.check" :disabled="scope.row.disabled" />
</template>
</el-table-column>
<el-table-column prop="operate" :label="$t('menu.menuDialog.operatingArea')" width="140">
<template slot-scope="scope">
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.operate }}</span>
</template>
</el-table-column>
<el-table-column prop="control" :label="$t('menu.menuDialog.controlMode')" width="80">
<template slot-scope="scope">
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.control }}</span>
</template>
</el-table-column>
<el-table-column prop="status" :label="$t('menu.menuDialog.centerStationCommunicationStatus')" width="140">
<template slot-scope="scope">
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.status }}</span>
</template>
</el-table-column>
<el-table-column prop="result" :label="$t('menu.menuDialog.transferExecutionStatus')">
<template slot-scope="scope">
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.result }}</span>
</template>
</el-table-column>
</el-table>
<el-row class="button-group">
<el-col :span="10" :offset="3" class="control_button">
<el-button v-if="isFork" :id="domIdFork" :disabled="disabledCommit" @click="forkCommit">{{ $t('menu.menuDialog.forcedStationControl') }}</el-button>
<el-button v-if="isRequest" :id="domIdRequest" :disabled="disabledCommit" @click="requestCommit">{{ $t('menu.menuDialog.requestStationControl') }}
</el-button>
<el-button v-if="isConter" :id="domIdConter" :disabled="disabledCommit" @click="conterCommit">{{ $t('menu.menuDialog.requestInTheControl') }}
</el-button>
</el-col>
<el-col :span="6" :offset="4">
<el-button :id="domIdCancel" :disabled="disabledClose" @click="cancel">{{ $t('menu.menuDialog.close') }}
</el-button>
</el-col>
</el-row>
<two-confirmation ref="twoConfirmation" @setOperate="getOperate" />
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
import TwoConfirmation from './childDialog/twoConfirmation';
export default {
name: 'StationControlConvert',
components: {
TwoConfirmation
},
data() {
return {
operate: null,
dialogShow: false,
disabledSend: false,
disabledSure: false,
disabledClose: false,
operation: '',
controlProps: {
'01': this.$t('menu.menuDialog.inTheControl'),
'02': this.$t('menu.menuDialog.stationControl')
},
selection: [],
tableData: [],
timer: null,
count: 0,
flagListBit: [],
backOperate: '',
timeout: 61,
counts: 0
};
},
computed: {
...mapGetters('map', [
'stationList',
'stationControlList'
]),
...mapGetters('training', [
'mode',
'started'
]),
disabledCommit() {
return this.disabledSend || this.disabledSure;
},
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
isFork() {
if (this.dialogShow) {
return OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl);
}
return false;
},
isRequest() {
if (this.dialogShow) {
return OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestStationControl);
}
return false;
},
isConter() {
if (this.dialogShow) {
return OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl);
}
return false;
},
domIdChoose() {
if (this.dialogShow) {
if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl)) {
return OperationEvent.StationControl.forcedStationControl.choose.domId;
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestStationControl)) {
return OperationEvent.StationControl.requestStationControl.choose.domId;
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)) {
return OperationEvent.StationControl.requestCentralControl.choose.domId;
}
}
return false;
},
domIdConter() {
return this.dialogShow ? OperationEvent.StationControl.requestCentralControl.menu.domId : '';
},
domIdFork() {
return this.dialogShow ? OperationEvent.StationControl.forcedStationControl.menu.domId : '';
},
domIdRequest() {
return this.dialogShow ? OperationEvent.StationControl.requestStationControl.menu.domId : '';
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
}
},
watch: {
'$store.state.socket.msgHead': function (elem) {
if (elem) {
this.flagListBit[this.selection.forEach(elem => { return elem.stationControlCode == elem.code; })] = false;
if (elem.hasOwnProperty('timeout')) {
this.updateTableValue(elem.stationControlCode, { result: this.$t('menu.menuDialog.acceptConversionResponseTimeout') }, false);
} else if (elem.hasOwnProperty('agree')) {
if (elem.agree) {
this.updateTableValue(elem.stationControlCode, { result: this.$t('menu.menuDialog.controlModeTransfersuccees') }, true);
} else {
this.updateTableValue(elem.stationControlCode, { result: this.$t('menu.menuDialog.controlModeTransferFailed') }, false);
}
}
this.disabledClose = false;
this.disabledSure = false;
}
},
backOperate: function (operate) {
if (this.dialogShow && operate) {
if (operate.selection && operate.selection.length) {
operate.selection.forEach(elem => {
if (operate.commit) {
this.updateTableValue(elem.code, { result: `${this.$t('menu.menuDialog.senedMessageOne')}${this.timeout} ${this.$t('menu.menuDialog.senedMessageTwo')}` }, false);
} else if (operate.cancel) {
this.updateTableValue(elem.code, { result: '' }, false);
}
});
}
}
},
//
tableData: {
handler(val, oldVal) {
this.checkTableDataSelction(val);
},
deep: true
}
},
mounted() {
this.loadTableData();
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
updateTableValue(code, result, success) {
this.tableData.forEach((row, index) => {
if (row.code == code) {
for (const prop in result) {
row[prop] = result[prop];
}
if (success) {
if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl) || OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestStationControl)) {
row.control = this.controlProps['02']; // 01: 02:
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)) {
row.control = this.controlProps['01']; // 01: 02:
}
row.disabled = true;
row.check = false;
}
}
});
},
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.handleChooseChange(selection);
this.selection = selection;
}
},
checkBoxDisabled(row) {
const control = (this.$store.getters['map/getDeviceByCode'](row.code) || {});
if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl) || OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestStationControl)) {
if (control && control.status == '02') { // 01: 02:
return true;
}
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)) {
if (control && control.status == '01') { // 01: 02:
return true;
}
}
},
loadTableData() {
this.tableData = [];
this.stationControlList && this.stationControlList.forEach(control => {
const station = this.$store.getters['map/getDeviceByCode'](control.stationCode);
this.tableData.push({
code: control.code,
operate: station.name || '',
control: '',
check: false,
disabled: false,
status: this.$t('menu.menuDialog.normal'),
result: ''
});
});
},
initTableDataStatus() {
this.tableData.forEach(row => {
row.disabled = this.checkBoxDisabled(row);
row.check = false;
row.result = '';
const control = this.$store.getters['map/getDeviceByCode'](row.code);
if (control) {
row.control = this.controlProps[control.status];
}
});
},
doShow(operate) {
if (!this.dialogShow) {
this.operate = operate || {};
this.operation = operate.operation;
this.disabledSure = false;
this.initTableDataStatus();
}
this.dialogShow = true;
this.$store.dispatch('training/emitTipFresh');
},
doClose() {
if (this.dialogShow) {
this.$store.dispatch('socket/shiftMsgQueue');
}
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.$refs.multipleTable.setCurrentRow();
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
});
},
setTimer() {
this.clearTimer();
this.flagListBit = new Array(this.selection.length).fill(true);
this.timer = setInterval(() => {
(this.selection || []).forEach((elem, index) => {
if (this.flagListBit[index]) {
elem['count'] = (elem['count'] || 0) + 1;
elem['count'] > this.timeout && (
this.flagListBit[index] = false,
this.setRequestTimeout(elem)
);
}
});
this.flagListBit.findIndex(elem => { return elem; }) < 0 && this.clearTimer();
}, 1000);
},
clearTimer() {
this.count = 0;
if (this.timer) {
clearInterval(this.timer);
this.timer = null;
}
},
setRequestTimeout(elem) {
elem['count'] = 0;
this.$store.dispatch('socket/pushMsgQueue',
{ type: 'resp', timeout: 'true', stationControlCode: elem.code }
);
},
handleChooseChange(selection) {
this.selection = selection;
const stationCodeList = selection.map(elem => { return elem.code; });
if (selection && selection.length) {
const operate = {
operation: '',
val: stationCodeList.join('::'),
selection: selection
};
if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl)) {
operate.operation = OperationEvent.StationControl.forcedStationControl.choose.operation;
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestStationControl)) {
operate.operation = OperationEvent.StationControl.requestStationControl.choose.operation;
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)) {
operate.operation = OperationEvent.StationControl.requestCentralControl.choose.operation;
}
this.disabledSure = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.disabledSure = false;
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
} else if (!selection) {
this.$messageBox(this.$t('menu.menuDialog.selectData'));
}
},
requestCommit() {
const stationCodeList = this.selection.map(elem => { return elem.code; });
const operate = {
messages: [this.$t('menu.menuDialog.confirmStationControlTip')],
operation: OperationEvent.StationControl.requestStationControl.menu.operation,
val: stationCodeList.join('::'),
selection: this.selection
};
this.selection.forEach((elem, index) => {
operate.messages.push(`${this.$t('menu.menuDialog.operatingArea')} ${index + 1}:${elem.operate}`);
});
this.disabledSure = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.twoConfirmation.doShow(operate);
} else {
this.disabledSure = false;
}
}).catch(() => {
this.disabledSure = false;
});
},
forkCommit() {
const stationCodeList = this.selection.map(elem => { return elem.code; });
const operate = {
messages: [this.$t('menu.menuDialog.confirmInTheControlTip')],
operation: OperationEvent.StationControl.forcedStationControl.menu.operation,
val: stationCodeList.join('::'),
selection: this.selection
};
this.selection.forEach((elem, index) => {
operate.messages.push(`${this.$t('menu.menuDialog.operatingArea')} ${index + 1}:${elem.operate}`);
});
this.disabledSure = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.twoConfirmation.doShow(operate);
} else {
this.disabledSure = false;
}
}).catch(() => {
this.disabledSure = false;
});
},
conterCommit() {
const stationCodeList = this.selection.map(elem => { return elem.code; });
const operate = {
messages: [this.$t('menu.menuDialog.confirmInTheControlTip')],
operation: OperationEvent.StationControl.requestCentralControl.menu.operation,
val: stationCodeList.join('::'),
selection: this.selection
};
this.selection.forEach((elem, index) => {
operate.messages.push(`${this.$t('menu.menuDialog.operatingArea')} ${index + 1}:${elem.operate}`);
});
this.disabledSure = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.twoConfirmation.doShow(operate);
} else {
this.disabledSure = false;
}
}).catch(() => {
this.disabledSure = false;
});
},
getOperate(operate) {
this.backOperate = operate;
if (operate.cancel) {
this.disabledSure = this.disabledSend = false;
}
if (operate.commit || operate.timeout) {
this.disabledSend = this.disabledSure = true;
}
this.setTimer();
this.disabledClose = true;
this.counts = 1;
}
}
};
</script>
<style lang="scss" scoped>
.haerbin-01__systerm .el-dialog .control_button button{
max-width:180px;
width:auto ;
padding-left: 5px ;
padding-right: 5px ;
min-width: 80px;
}
</style>

View File

@ -1,179 +0,0 @@
<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="100px" :model="addModel" :rules="rules">
<div style="padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px;">
<span class="base-label">{{ $t('menu.menuDialog.addLocation') }}</span>
<div style="position: relative; top:-10px;">
<el-form-item prop="stationStandCode">
<span slot="label">{{ $t('menu.menuDialog.terminalOne') }}</span>
<el-select v-model="addModel.stationStandCode" filterable :placeholder="$t('menu.menuDialog.pleaseSelect')">
<el-option
v-for="item in stationStandList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</el-form-item>
<el-form-item prop="trainNumberLimber">
<span id="frontTrainNumber" slot="label">{{ $t('menu.menuDialog.frontTrainNumber') }}</span>
<el-input v-model="addModel.trainNumberLimber" />
</el-form-item>
</div>
</div>
<el-form-item id="groupNumber" :label="$t('menu.menuDialog.addTrainNumber')" label-width="115px" prop="groupNumber">
<el-input v-model="addModel.groupNumber" />
</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('menu.menuDialog.confirm') }}</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.menuDialog.cancel') }}</el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'TrainAdd',
components: {
},
data() {
return {
trainNoList: [],
addModel: {
groupNumber: '',
stationStandCode: '',
trainNumberLimber: ''
},
rules: {
groupNumber: [
{ required: true, message: this.$t('menu.menuDialog.inputTrainNumber'), trigger: 'blur' }
],
// trainNumberLimber: [
// { required: true, message: '', trigger: 'blur' }
// ],
stationStandCode: [
{ required: true, message: this.$t('menu.menuDialog.selectTerminal'), trigger: 'change' }
]
},
operation: null,
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.Command.planTrain.addPlanTrain.domId : '';
},
title() {
return this.$t('menu.menuDialog.addPlanTrain');
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate) {
this.operate = operate || {};
this.operation = operate.operation;
//
if (!this.dialogShow) {
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() {
this.$refs['form'].validate((valid) => {
if (valid) {
const operate = {
send: true,
operation: OperationEvent.Command.planTrain.addPlanTrain.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
} else {
// this.$refs.noticeInfo.doShow(operate);
}
}).catch(() => {
this.loading = false;
this.doClose();
// this.$refs.noticeInfo.doShow(operate);
});
} else {
return false;
}
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', 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;
}
#frontTrainNumber,#groupNumber label{
line-height: 100%;
display: inline-block;
}
</style>

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