Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
0719a2031e
@ -264,7 +264,9 @@ class SkinCode extends defaultStyle {
|
|||||||
showName: true,
|
showName: true,
|
||||||
selectColor: '#0000ff',
|
selectColor: '#0000ff',
|
||||||
flashingColor: '#ffff00',
|
flashingColor: '#ffff00',
|
||||||
countOffset: { x: 0, y: -15 }
|
countOffset: { x: 0, y: -15 },
|
||||||
|
typeList: ['PICK_ASSIST', 'DEPART_ASSIST', 'ASSIST', 'GUIDELOCK', 'SECTION_FAULT_UNLOCK', 'LOCATE', 'REVERSE', 'CANCEL', 'HUMAN_RELEASE_ROUTE', 'MONOLOCK',
|
||||||
|
'UNLOCK', 'BLOCK', 'UNBLOCK', 'CHANGE_DIRECTION', 'ACCIDENT', 'RECOVERY', 'OCCLUSION', 'FAULT_NOTICE', 'GUIDE']
|
||||||
};
|
};
|
||||||
this[deviceType.SwitchFault] = {
|
this[deviceType.SwitchFault] = {
|
||||||
text: {
|
text: {
|
||||||
@ -1186,6 +1188,10 @@ class SkinCode extends defaultStyle {
|
|||||||
lineWidth: 3
|
lineWidth: 3
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
this[deviceType.Counter] = {
|
||||||
|
fontSize: 11,
|
||||||
|
defaultColor: '#fff'
|
||||||
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -343,4 +343,8 @@ deviceRender[deviceType.NoStatusLamp] = {
|
|||||||
_type: deviceType.NoStatusLamp,
|
_type: deviceType.NoStatusLamp,
|
||||||
zlevel: 1
|
zlevel: 1
|
||||||
};
|
};
|
||||||
|
deviceRender[deviceType.Counter] = {
|
||||||
|
_type: deviceType.Counter,
|
||||||
|
zlevel: 1
|
||||||
|
};
|
||||||
export default deviceRender;
|
export default deviceRender;
|
||||||
|
@ -62,6 +62,7 @@ const deviceType = {
|
|||||||
AssistStatus: 'AssistStatus',
|
AssistStatus: 'AssistStatus',
|
||||||
SectionOccupied: 'SectionOccupied',
|
SectionOccupied: 'SectionOccupied',
|
||||||
ThroatRoute: 'ThroatRoute',
|
ThroatRoute: 'ThroatRoute',
|
||||||
NoStatusLamp: 'NoStatusLamp'
|
NoStatusLamp: 'NoStatusLamp',
|
||||||
|
Counter: 'Counter'
|
||||||
};
|
};
|
||||||
export default deviceType;
|
export default deviceType;
|
||||||
|
@ -1,26 +1,29 @@
|
|||||||
class Options {
|
class Options {
|
||||||
constructor(opts, trigger) {
|
constructor(opts, trigger) {
|
||||||
this.scaleIndex = 0;
|
this.scaleIndex = 0;
|
||||||
this.scaleList = [
|
// this.scaleList = [
|
||||||
0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9,
|
// 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9,
|
||||||
1, 1.2, 1.4, 1.6, 1.8,
|
// 1, 1.2, 1.4, 1.6, 1.8,
|
||||||
2, 2.2, 2.4, 2.6, 2.8,
|
// 2, 2.2, 2.4, 2.6, 2.8,
|
||||||
3, 3.2, 3.4, 3.6, 3.8,
|
// 3, 3.2, 3.4, 3.6, 3.8,
|
||||||
4, 4.2, 4.4, 4.6, 4.8,
|
// 4, 4.2, 4.4, 4.6, 4.8,
|
||||||
5, 5.2, 5.4, 5.6, 5.8,
|
// 5, 5.2, 5.4, 5.6, 5.8,
|
||||||
6, 6.2, 6.4, 6.6, 6.8,
|
// 6, 6.2, 6.4, 6.6, 6.8,
|
||||||
7, 7.2, 7.4, 7.6, 7.8,
|
// 7, 7.2, 7.4, 7.6, 7.8,
|
||||||
8
|
// 8
|
||||||
];
|
// ];
|
||||||
|
this.minScale = 0.1;
|
||||||
|
this.maxScale = 10;
|
||||||
|
|
||||||
if (Number.isFinite(opts.scaleRate)) {
|
if (Number.isFinite(opts.scaleRate)) {
|
||||||
const idx = this.scaleList.indexOf(opts.scaleRate);
|
// const idx = this.scaleList.indexOf(opts.scaleRate);
|
||||||
|
const idx = opts.scaleRate * 20;
|
||||||
if (idx >= 0) {
|
if (idx >= 0) {
|
||||||
this.scaleIndex = idx;
|
this.scaleIndex = idx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.scaleRate = opts.scaleRate || this.scaleList[this.scaleIndex]; // 缩放比例
|
this.scaleRate = opts.scaleRate || this.scaleIndex * 0.05; // 缩放比例
|
||||||
|
|
||||||
this.offsetX = opts.offsetX || 0; // x偏移
|
this.offsetX = opts.offsetX || 0; // x偏移
|
||||||
|
|
||||||
@ -56,16 +59,19 @@ class Options {
|
|||||||
|
|
||||||
if (Number.isFinite(payload.scale)) {
|
if (Number.isFinite(payload.scale)) {
|
||||||
if (Number.isFinite(payload.scale)) {
|
if (Number.isFinite(payload.scale)) {
|
||||||
if ((this.scaleIndex + payload.scale) >= 0 && (this.scaleIndex + payload.scale) < this.scaleList.length) {
|
// if ((this.scaleIndex + payload.scale) >= 0 && (this.scaleIndex + payload.scale) < this.scaleList.length) {
|
||||||
this.scaleIndex = this.scaleIndex + payload.scale;
|
// this.scaleIndex = this.scaleIndex + payload.scale;
|
||||||
|
// }
|
||||||
|
if ((payload.scale + this.scaleIndex >= 2) && (payload.scale + this.scaleIndex <= 200)) {
|
||||||
|
this.scaleIndex = payload.scale + this.scaleIndex;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.scaleRate = this.scaleList[this.scaleIndex];
|
this.scaleRate = (this.scaleIndex * 0.05).toFixed(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Number.isFinite(payload.scaleRate)) {
|
if (Number.isFinite(payload.scaleRate)) {
|
||||||
const idx = this.scaleList.indexOf(payload.scaleRate);
|
const idx = payload.scaleRate * 20;
|
||||||
if (idx < 0) {
|
if (idx < 2 || idx > 200) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.scaleIndex = idx;
|
this.scaleIndex = idx;
|
||||||
@ -89,11 +95,11 @@ class Options {
|
|||||||
|
|
||||||
getScaleRate(scale) {
|
getScaleRate(scale) {
|
||||||
if (Number.isFinite(scale)) {
|
if (Number.isFinite(scale)) {
|
||||||
if ((this.scaleIndex + scale) >= 0 && (this.scaleIndex + scale) < this.scaleList.length) {
|
if (( scale + this.scaleIndex) >= 2 && (scale + this.scaleIndex) <= 200) {
|
||||||
return this.scaleList[this.scaleIndex + scale];
|
return ((scale + this.scaleIndex) * 0.05).toFixed(2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return this.scaleList[this.scaleIndex];
|
return (this.scaleIndex * 0.05).toFixed(2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -361,6 +361,7 @@ export function updateMapData(state, model) {
|
|||||||
case deviceType.SectionOccupied: updateForList(model, state, 'indicatorLightList'); break;
|
case deviceType.SectionOccupied: updateForList(model, state, 'indicatorLightList'); break;
|
||||||
case deviceType.ThroatRoute: updateForList(model, state, 'indicatorLightList'); break;
|
case deviceType.ThroatRoute: updateForList(model, state, 'indicatorLightList'); break;
|
||||||
case deviceType.NoStatusLamp: updateForList(model, state, 'indicatorLightList'); break;
|
case deviceType.NoStatusLamp: updateForList(model, state, 'indicatorLightList'); break;
|
||||||
|
case deviceType.Counter: updateForList(model, state, 'indicatorLightList'); break;
|
||||||
case deviceType.SplitStation: updateForList(model, state, 'splitStationList'); break;
|
case deviceType.SplitStation: updateForList(model, state, 'splitStationList'); break;
|
||||||
case deviceType.Arrow: updateForList(model, state, 'arrowList'); break;
|
case deviceType.Arrow: updateForList(model, state, 'arrowList'); break;
|
||||||
case deviceType.Power: updateForList(model, state, 'powerLineList'); break;
|
case deviceType.Power: updateForList(model, state, 'powerLineList'); break;
|
||||||
|
57
src/jmapNew/shape/graph/SaidLamp/ECounter.js
Normal file
57
src/jmapNew/shape/graph/SaidLamp/ECounter.js
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
import Group from 'zrender/src/container/Group';
|
||||||
|
import Text from 'zrender/src/graphic/Text';
|
||||||
|
|
||||||
|
export default class ECounter extends Group {
|
||||||
|
constructor(model) {
|
||||||
|
super();
|
||||||
|
this.model = model;
|
||||||
|
this.zlevel = model.zlevel;
|
||||||
|
this._subType = model._subType;
|
||||||
|
this.z = model.z;
|
||||||
|
this.onmouseover = model.mouseover;
|
||||||
|
this.onmouseout = model.mouseout;
|
||||||
|
this.create(model);
|
||||||
|
}
|
||||||
|
create(model) {
|
||||||
|
const style = model.style;
|
||||||
|
this.counter = new Text({
|
||||||
|
zlevel: this.zlevel,
|
||||||
|
z: this.z,
|
||||||
|
style: {
|
||||||
|
x: model.x,
|
||||||
|
y: model.y,
|
||||||
|
fontWeight: style.textStyle.fontWeight,
|
||||||
|
fontSize: style.Counter.fontSize,
|
||||||
|
fontFamily: style.fontFamily,
|
||||||
|
text: '000',
|
||||||
|
textFill: style.Counter.defaultColor,
|
||||||
|
textAlign: style.textStyle.textAlign,
|
||||||
|
textVerticalAlign: style.textStyle.textVerticalAlign
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.name = new Text({
|
||||||
|
zlevel: this.zlevel,
|
||||||
|
z: this.z,
|
||||||
|
style: {
|
||||||
|
x: model.x,
|
||||||
|
y: model.y + 20,
|
||||||
|
fontWeight: style.textStyle.fontWeight,
|
||||||
|
fontSize: style.Counter.fontSize,
|
||||||
|
fontFamily: style.fontFamily,
|
||||||
|
text: model.text,
|
||||||
|
textFill: style.Counter.defaultColor,
|
||||||
|
textAlign: style.textStyle.textAlign,
|
||||||
|
textVerticalAlign: style.textStyle.textVerticalAlign
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.add(this.counter);
|
||||||
|
this.add(this.name);
|
||||||
|
}
|
||||||
|
|
||||||
|
recover() {
|
||||||
|
}
|
||||||
|
show() {}
|
||||||
|
setCount(count) {
|
||||||
|
this.counter && this.counter.setStyle({ text: count || '000' });
|
||||||
|
}
|
||||||
|
}
|
@ -11,6 +11,7 @@ import EUnmanned from './EUnmanned';
|
|||||||
import EAxle from './EAxle';
|
import EAxle from './EAxle';
|
||||||
import EIndicatorLight from './EIndicatorLight';
|
import EIndicatorLight from './EIndicatorLight';
|
||||||
import EPickOrDepartArrow from './EPickOrDepartArrow';
|
import EPickOrDepartArrow from './EPickOrDepartArrow';
|
||||||
|
import ECounter from './ECounter';
|
||||||
import store from '@/store/index';
|
import store from '@/store/index';
|
||||||
|
|
||||||
export default class SaidLamp extends Group {
|
export default class SaidLamp extends Group {
|
||||||
@ -199,6 +200,17 @@ export default class SaidLamp extends Group {
|
|||||||
_subType: this._type
|
_subType: this._type
|
||||||
});
|
});
|
||||||
this.add(this.control);
|
this.add(this.control);
|
||||||
|
} else if (this._type === 'Counter' && this.style.Counter) {
|
||||||
|
this.control = new ECounter({
|
||||||
|
zlevel: this.zlevel,
|
||||||
|
z: this.z,
|
||||||
|
x: this.computedPosition.x,
|
||||||
|
y: this.computedPosition.y,
|
||||||
|
text: model.name,
|
||||||
|
style: this.style,
|
||||||
|
_subType: this._type
|
||||||
|
});
|
||||||
|
this.add(this.control);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -284,6 +296,8 @@ export default class SaidLamp extends Group {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else if (model._type === deviceType.Counter) {
|
||||||
|
this.control && this.control.setCount(model.count);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -42,6 +42,7 @@ export default class SignalButton extends Group {
|
|||||||
this.model = model;
|
this.model = model;
|
||||||
this.style = style;
|
this.style = style;
|
||||||
this.pressed = false;
|
this.pressed = false;
|
||||||
|
this.typeList = this.style.SignalButton.typeList || typeList;
|
||||||
// Line
|
// Line
|
||||||
this.create();
|
this.create();
|
||||||
this.setState(model);
|
this.setState(model);
|
||||||
@ -51,7 +52,7 @@ export default class SignalButton extends Group {
|
|||||||
const model = this.model;
|
const model = this.model;
|
||||||
const computedPosition = this.computedPosition;
|
const computedPosition = this.computedPosition;
|
||||||
const fillColor = this.getTypeColor();
|
const fillColor = this.getTypeColor();
|
||||||
if (this.style.SignalButton && this.style.SignalButton.shape === 'roundWithDock' && typeList.includes(model.type)) {
|
if (this.style.SignalButton && this.style.SignalButton.shape === 'roundWithDock' && this.typeList.includes(model.type)) {
|
||||||
const circle1 = new Circle({
|
const circle1 = new Circle({
|
||||||
zlevel: this.zlevel,
|
zlevel: this.zlevel,
|
||||||
z: this.z + 2,
|
z: this.z + 2,
|
||||||
@ -277,7 +278,7 @@ export default class SignalButton extends Group {
|
|||||||
this.rectButton && this.rectButton.stopAnimation(true);
|
this.rectButton && this.rectButton.stopAnimation(true);
|
||||||
}
|
}
|
||||||
getTypeColor() {
|
getTypeColor() {
|
||||||
if (this.style.SignalButton && this.style.SignalButton.fillColor && typeList.includes(this.model.type)) {
|
if (this.style.SignalButton && this.style.SignalButton.fillColor && this.typeList.includes(this.model.type)) {
|
||||||
return this.style.SignalButton.fillColor;
|
return this.style.SignalButton.fillColor;
|
||||||
}
|
}
|
||||||
let color = '';
|
let color = '';
|
||||||
|
@ -89,6 +89,7 @@ mapShape[deviceType.AssistStatus] = SaidLamp;
|
|||||||
mapShape[deviceType.SectionOccupied] = SaidLamp;
|
mapShape[deviceType.SectionOccupied] = SaidLamp;
|
||||||
mapShape[deviceType.ThroatRoute] = SaidLamp;
|
mapShape[deviceType.ThroatRoute] = SaidLamp;
|
||||||
mapShape[deviceType.NoStatusLamp] = SaidLamp;
|
mapShape[deviceType.NoStatusLamp] = SaidLamp;
|
||||||
|
mapShape[deviceType.Counter] = SaidLamp;
|
||||||
mapShape[deviceType.SplitStation] = SplitStation;
|
mapShape[deviceType.SplitStation] = SplitStation;
|
||||||
mapShape[deviceType.Arrow] = Arrow;
|
mapShape[deviceType.Arrow] = Arrow;
|
||||||
mapShape[deviceType.Power] = Power;
|
mapShape[deviceType.Power] = Power;
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
<center><b>按</b><b>钮</b></center>
|
<center><b>按</b><b>钮</b></center>
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
<button :id="Station.guideLock.button.domId" :disabled="true" class="button_box" @click="buttonDown(Station.guideLock.button.operation, ['SignalButton'])">
|
<button :id="Station.guideLock.button.domId" class="button_box" @click="buttonDown(Station.guideLock.button.operation, ['SignalButton'])">
|
||||||
<span :style="{color: operation === Station.guideLock.button.operation?'#ccc':'black'}">
|
<span :style="{color: operation === Station.guideLock.button.operation?'#ccc':'black'}">
|
||||||
<center><b>引</b><b>导</b></center>
|
<center><b>引</b><b>导</b></center>
|
||||||
<center><b>总</b><b>锁</b></center>
|
<center><b>总</b><b>锁</b></center>
|
||||||
@ -72,22 +72,28 @@
|
|||||||
<center><b>不</b><b>良</b></center>
|
<center><b>不</b><b>良</b></center>
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
<button :id="MixinCommand.block.button.domId" class="button_box" @click="buttonDown(MixinCommand.lock.button.operation, ['Switch', 'Signal'])">
|
<button :id="MixinCommand.block.button.domId" class="button_box" @click="buttonDown(MixinCommand.block.button.operation, ['Switch', 'Signal', 'Section'])">
|
||||||
<span :style="{color: operation === MixinCommand.block.button.operation ? '#ccc':'black'}">
|
<span :style="{color: operation === MixinCommand.block.button.operation ? '#ccc':'black'}">
|
||||||
<center><b>封</b><b>锁</b></center>
|
<center><b>封</b><b>锁</b></center>
|
||||||
<center><b>按</b><b>钮</b></center>
|
<center><b>按</b><b>钮</b></center>
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
<button :id="333" :disabled="true" class="button_box" @click="buttonDown()">
|
<button :id="Section.fault.button.domId" class="button_box" @click="buttonDown(Section.fault.button.operation, ['Section'])">
|
||||||
<span style="color: black;">
|
<span :style="{color: operation === Section.fault.button.operation ? '#ccc':'black'}">
|
||||||
<center><b>区</b></center>
|
<center><b>区</b></center>
|
||||||
<center><b>故</b><b>解</b></center>
|
<center><b>故</b><b>解</b></center>
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
<button :id="444" :disabled="true" class="button_box" @click="buttonDown()">
|
<button :id="MixinCommand.functionButton.button.domId" class="button_box" @click="buttonDown(MixinCommand.functionButton.button.operation, ['SignalButton'])">
|
||||||
<span style="color: black;">
|
<span style="color: black;">
|
||||||
<center><b>功</b><b>能</b></center>
|
<center>
|
||||||
<center><b>按</b><b>钮</b></center>
|
<b :style="{color: operation === MixinCommand.functionButton.button.operation ? '#ccc':'#000080'}">功</b>
|
||||||
|
<b :style="{color: operation === MixinCommand.functionButton.button.operation ? '#ccc':'#8A1715'}">能</b>
|
||||||
|
</center>
|
||||||
|
<center>
|
||||||
|
<b :style="{color: operation === MixinCommand.functionButton.button.operation ? '#ccc':'#FF00FF'}">按</b>
|
||||||
|
<b :style="{color: operation === MixinCommand.functionButton.button.operation ? '#ccc':'#038103'}">钮</b>
|
||||||
|
</center>
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
<button :id="555" :disabled="true" class="button_box" @click="buttonDown()">
|
<button :id="555" :disabled="true" class="button_box" @click="buttonDown()">
|
||||||
@ -179,8 +185,6 @@ export default {
|
|||||||
deviceTimeNode: 0, // 信号按钮设备15秒 计时
|
deviceTimeNode: 0, // 信号按钮设备15秒 计时
|
||||||
routeDataMap: null, // btnCodeList 为key
|
routeDataMap: null, // btnCodeList 为key
|
||||||
routeButtonCodeList: [], // btnCodeList 拼接code list
|
routeButtonCodeList: [], // btnCodeList 拼接code list
|
||||||
guideLockRightFlag: false,
|
|
||||||
guideLockLeftFlag: false,
|
|
||||||
displayFlags: {
|
displayFlags: {
|
||||||
chineseCharacter: true,
|
chineseCharacter: true,
|
||||||
buttonName: true,
|
buttonName: true,
|
||||||
@ -267,8 +271,6 @@ export default {
|
|||||||
this.commandTypeList = [];
|
this.commandTypeList = [];
|
||||||
this.$store.dispatch('menuOperation/setButtonOperation', null);
|
this.$store.dispatch('menuOperation/setButtonOperation', null);
|
||||||
this.clearOperate();
|
this.clearOperate();
|
||||||
this.guideLockRightFlag = false;
|
|
||||||
this.guideLockLeftFlag = false;
|
|
||||||
},
|
},
|
||||||
'$store.state.socket.simulationTimeSync': function(val) {
|
'$store.state.socket.simulationTimeSync': function(val) {
|
||||||
if (this.timeNode && val - this.timeNode >= 15) {
|
if (this.timeNode && val - this.timeNode >= 15) {
|
||||||
@ -359,29 +361,16 @@ export default {
|
|||||||
},
|
},
|
||||||
// 执行操作
|
// 执行操作
|
||||||
trainingOperation(operate) {
|
trainingOperation(operate) {
|
||||||
this.$store
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
.dispatch('training/nextNew', operate)
|
if (valid) {
|
||||||
.then(({ valid }) => {
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
if (valid) {
|
if (operate.over) { this.clearOperate(); }
|
||||||
/* 引导总锁输入面后 处理按钮选中状态 */
|
}
|
||||||
if (
|
}).catch(error => {
|
||||||
operate.operationPre === this.Switch.guideLock.leftButton.operation ||
|
console.error(error);
|
||||||
operate.operation === this.Switch.guideLock.leftButton.operation
|
this.clearOperate();
|
||||||
) {
|
this.$refs.noticeInfo.doShow();
|
||||||
this.guideLockLeftFlag = !this.guideLockLeftFlag;
|
});
|
||||||
} else if (
|
|
||||||
operate.operationPre === this.Switch.guideLock.rightButton.operation ||
|
|
||||||
operate.operation === this.Switch.guideLock.rightButton.operation
|
|
||||||
) {
|
|
||||||
this.guideLockRightFlag = !this.guideLockRightFlag;
|
|
||||||
}
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch(error => {
|
|
||||||
console.error(error);
|
|
||||||
this.$refs.noticeInfo.doShow();
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
updateButtonShow(val, old) {
|
updateButtonShow(val, old) {
|
||||||
if (old) {
|
if (old) {
|
||||||
@ -413,19 +402,17 @@ export default {
|
|||||||
code: this.$store.state.map.showCentralizedStationCode,
|
code: this.$store.state.map.showCentralizedStationCode,
|
||||||
param: { stationCode: this.$store.state.map.showCentralizedStationCode }
|
param: { stationCode: this.$store.state.map.showCentralizedStationCode }
|
||||||
};
|
};
|
||||||
this.$store
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
.dispatch('training/nextNew', operate)
|
if (valid) {
|
||||||
.then(({ valid }) => {
|
this.clearOperate();
|
||||||
if (valid) {
|
} else {
|
||||||
this.clearOperate();
|
|
||||||
} else {
|
|
||||||
this.$refs.noticeInfo.doShow();
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch(error => {
|
|
||||||
console.error(error);
|
|
||||||
this.$refs.noticeInfo.doShow();
|
this.$refs.noticeInfo.doShow();
|
||||||
});
|
}
|
||||||
|
}).catch(error => {
|
||||||
|
console.error(error);
|
||||||
|
this.clearOperate();
|
||||||
|
this.$refs.noticeInfo.doShow();
|
||||||
|
});
|
||||||
},
|
},
|
||||||
// 分路不良
|
// 分路不良
|
||||||
handelDefectiveShunting(model) {
|
handelDefectiveShunting(model) {
|
||||||
@ -446,13 +433,18 @@ export default {
|
|||||||
this.Signal.humanTrainRoute.button.operation,
|
this.Signal.humanTrainRoute.button.operation,
|
||||||
this.Section.fault.button.operation,
|
this.Section.fault.button.operation,
|
||||||
this.Section.defectiveShunting.button.operation,
|
this.Section.defectiveShunting.button.operation,
|
||||||
this.Signal.guide.button.operation
|
this.Signal.guide.button.operation,
|
||||||
|
this.Station.guideLock.button.operation,
|
||||||
|
this.Switch.unlock.button.operation,
|
||||||
|
this.Switch.lock.button.operation,
|
||||||
|
this.MixinCommand.block.button.operation
|
||||||
];
|
];
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.operation = operation;
|
this.operation = operation;
|
||||||
this.commandTypeList = commandTypeList;
|
this.commandTypeList = commandTypeList;
|
||||||
this.$store.dispatch('menuOperation/setButtonOperation', operation); // 按钮菜单是否被按下
|
this.$store.dispatch('menuOperation/setButtonOperation', operation); // 按钮菜单是否被按下
|
||||||
|
console.log(operation, this.$store.state.menuOperation.buttonOperation, '--------');
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
// 判断是否需要 弹窗密码框
|
// 判断是否需要 弹窗密码框
|
||||||
if (operationList.includes(operation)) {
|
if (operationList.includes(operation)) {
|
||||||
@ -473,7 +465,6 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.commandTypeList = [];
|
this.commandTypeList = [];
|
||||||
this.$store.dispatch('menuOperation/setButtonOperation', null);
|
this.$store.dispatch('menuOperation/setButtonOperation', null);
|
||||||
this.guideLockRightFlag = false;
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -506,7 +497,7 @@ export default {
|
|||||||
};
|
};
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
|
||||||
this.clearOperate();
|
this.clearOperate();
|
||||||
}).catch(() => this.$refs.noticeInfo.doShow());
|
}).catch(() => { this.$refs.noticeInfo.doShow(); this.clearOperate(); });
|
||||||
},
|
},
|
||||||
// 排列进路 OR 信号重开操作
|
// 排列进路 OR 信号重开操作
|
||||||
arrangementRouteOperation(deviceList) {
|
arrangementRouteOperation(deviceList) {
|
||||||
@ -528,29 +519,27 @@ export default {
|
|||||||
if (deviceList.length === 1 && !signal.lockedRouteCode) {
|
if (deviceList.length === 1 && !signal.lockedRouteCode) {
|
||||||
// 排列进路 处理始端信号机状态
|
// 排列进路 处理始端信号机状态
|
||||||
operate.code = deviceList[0].code;
|
operate.code = deviceList[0].code;
|
||||||
this.$store
|
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
|
||||||
.dispatch('training/nextNew', operate)
|
if (valid) {
|
||||||
.then(({ valid, response }) => {
|
// 仅信号按钮调车信号机有状态
|
||||||
if (valid) {
|
if (deviceList[0]._type === 'SignalButton' || (deviceList[0]._type === 'Signal' && deviceList[0].type === 'SHUNTING')) {
|
||||||
// 仅信号按钮调车信号机有状态
|
const routeDeviceList = [];
|
||||||
if (deviceList[0]._type === 'SignalButton' || (deviceList[0]._type === 'Signal' && deviceList[0].type === 'SHUNTING')) {
|
this.routeList.forEach(item => {
|
||||||
const routeDeviceList = [];
|
if (item && item.btnCodeList && item.btnCodeList.length && this.deviceList && this.deviceList.length && item.btnCodeList[0] === deviceList[0].code) {
|
||||||
this.routeList.forEach(item => {
|
routeDeviceList.push(this.$store.getters['map/getDeviceByCode'](item.btnCodeList[1]));
|
||||||
if (item && item.btnCodeList && item.btnCodeList.length && this.deviceList && this.deviceList.length && item.btnCodeList[0] === deviceList[0].code) {
|
}
|
||||||
routeDeviceList.push(this.$store.getters['map/getDeviceByCode'](item.btnCodeList[1]));
|
});
|
||||||
}
|
const updateList = [{ code: deviceList[0].code, _type: deviceList[0]._type, hasSelected: 1 }];
|
||||||
});
|
routeDeviceList.forEach(item => {
|
||||||
const updateList = [{ code: deviceList[0].code, _type: deviceList[0]._type, hasSelected: 1 }];
|
updateList.push({ code: item.code, _type: item._type, toSelected: 1 });
|
||||||
routeDeviceList.forEach(item => {
|
});
|
||||||
updateList.push({ code: item.code, _type: item._type, toSelected: 1 });
|
this.$store.dispatch('training/updateMapState', updateList);
|
||||||
});
|
|
||||||
this.$store.dispatch('training/updateMapState', updateList);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
.catch(() => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow();
|
this.$refs.noticeInfo.doShow();
|
||||||
});
|
this.clearOperate();
|
||||||
|
});
|
||||||
} else if (deviceList.length > 1) {
|
} else if (deviceList.length > 1) {
|
||||||
let key = '';
|
let key = '';
|
||||||
deviceList.forEach((item, index) => {
|
deviceList.forEach((item, index) => {
|
||||||
@ -606,7 +595,7 @@ export default {
|
|||||||
code: model.code,
|
code: model.code,
|
||||||
operation: this.Signal.guide.button.operation,
|
operation: this.Signal.guide.button.operation,
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE,
|
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE,
|
||||||
param: { signalCode: model.signalCode }
|
param: { signalCode: model.signalCode, _COUNT: model.code }
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
|
||||||
this.$store.dispatch('training/updateMapState', [{ code: model.code, _type: model._type, toSelected: 1 }]);
|
this.$store.dispatch('training/updateMapState', [{ code: model.code, _type: model._type, toSelected: 1 }]);
|
||||||
@ -629,10 +618,10 @@ export default {
|
|||||||
// const signal = this.$store.getters['map/getDeviceByCode'](model.signalCode || model.code);
|
// const signal = this.$store.getters['map/getDeviceByCode'](model.signalCode || model.code);
|
||||||
console.log(model._type, model.type, '8888888');
|
console.log(model._type, model.type, '8888888');
|
||||||
if (model._type === 'SignalButton' && model.type === 'PICK') {
|
if (model._type === 'SignalButton' && model.type === 'PICK') {
|
||||||
operate.param = { signalCode: model.signalCode };
|
operate.param = { signalCode: model.signalCode, _COUNT: 'HumanSolution' };
|
||||||
this.sendCommand(operate);
|
this.sendCommand(operate);
|
||||||
} else if (model._type === 'Signal' && model.type === 'SHUNTING') {
|
} else if (model._type === 'Signal' && model.type === 'SHUNTING') {
|
||||||
operate.param = { signalCode: model.code };
|
operate.param = { signalCode: model.code, _COUNT: 'HumanSolution' };
|
||||||
this.sendCommand(operate);
|
this.sendCommand(operate);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -716,11 +705,18 @@ export default {
|
|||||||
const operate = {
|
const operate = {
|
||||||
operation: this.Station.guideLock.button.operation
|
operation: this.Station.guideLock.button.operation
|
||||||
};
|
};
|
||||||
|
const device = this.$store.getters['map/getDeviceByCode'](this.$store.state.map.showCentralizedStationCode);
|
||||||
|
let nextCmdType = '';
|
||||||
|
if (model.labelEnum === 'X') {
|
||||||
|
nextCmdType = device.xGuideMasterLock ? CMD.Station.CMD_STATION_MASTER_UNLOCK : CMD.Station.CMD_STATION_MASTER_LOCK;
|
||||||
|
} else if (model.labelEnum === 'S') {
|
||||||
|
nextCmdType = device.sGuideMasterLock ? CMD.Station.CMD_STATION_MASTER_UNLOCK : CMD.Station.CMD_STATION_MASTER_LOCK;
|
||||||
|
}
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
// 引导总锁弹出 调用取消引导总锁指令
|
// 引导总锁弹出 调用取消引导总锁指令
|
||||||
operate.nextCmdType = this.xGuideMasterLock ? CMD.Station.CMD_STATION_MASTER_UNLOCK : CMD.Station.CMD_STATION_MASTER_LOCK;
|
operate.nextCmdType = nextCmdType;
|
||||||
operate.param = { throat: model.labelEnum, stationCode: this.$store.state.map.showCentralizedStationCode };
|
operate.param = { throat: model.labelEnum, stationCode: this.$store.state.map.showCentralizedStationCode, _COUNT: model.code };
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
operate['operateNext'] = this.Command.close.password.operation;
|
operate['operateNext'] = this.Command.close.password.operation;
|
||||||
this.$refs.password.doShow(operate);
|
this.$refs.password.doShow(operate);
|
||||||
@ -734,7 +730,7 @@ export default {
|
|||||||
code: model.code,
|
code: model.code,
|
||||||
operation: this.$store.state.menuOperation.buttonOperation,
|
operation: this.$store.state.menuOperation.buttonOperation,
|
||||||
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK,
|
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK,
|
||||||
param: { sectionCode: model.code }
|
param: { sectionCode: model.code, _COUNT: 'FaultSection' }
|
||||||
};
|
};
|
||||||
this.sendCommand(operate);
|
this.sendCommand(operate);
|
||||||
}
|
}
|
||||||
@ -747,11 +743,7 @@ export default {
|
|||||||
this.pressedSignalButton.instance.pressDown(false);
|
this.pressedSignalButton.instance.pressDown(false);
|
||||||
this.pressedSignalButton = null;
|
this.pressedSignalButton = null;
|
||||||
}
|
}
|
||||||
if (
|
if ((this.$store.state.training.prdType != '01' && this.$store.state.training.prdType != '10') || this.selected._event !== MouseEvent.Left || (!model._type && !model._code)) {
|
||||||
(this.$store.state.training.prdType != '01' && this.$store.state.training.prdType != '10') ||
|
|
||||||
this.selected._event !== MouseEvent.Left ||
|
|
||||||
(!model._type && !model._code)
|
|
||||||
) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const buttonOperation = this.$store.state.menuOperation.buttonOperation;
|
const buttonOperation = this.$store.state.menuOperation.buttonOperation;
|
||||||
@ -763,18 +755,17 @@ export default {
|
|||||||
this.Switch.block.button.operation,
|
this.Switch.block.button.operation,
|
||||||
this.Switch.unblock.button.operation
|
this.Switch.unblock.button.operation
|
||||||
];
|
];
|
||||||
const signalButtonOperation = [
|
// const signalButtonOperation = [
|
||||||
'LOCATE', // 总定
|
// 'LOCATE', // 总定
|
||||||
'REVERSE', // 总反
|
// 'REVERSE', // 总反
|
||||||
'MONOLOCK', // 单锁
|
// 'MONOLOCK', // 单锁
|
||||||
'UNLOCK', // 解锁
|
// 'UNLOCK', // 解锁
|
||||||
'BLOCK', // 单封
|
// 'BLOCK', // 单封
|
||||||
'UNBLOCK', // 解封,
|
// 'UNBLOCK', // 解封,
|
||||||
'SECTION_FAULT_UNLOCK', // 区故解
|
// 'SECTION_FAULT_UNLOCK', // 区故解
|
||||||
'CANCEL', // 总取消
|
// 'CANCEL', // 总取消
|
||||||
'HUMAN_RELEASE_ROUTE' // 总人解
|
// 'HUMAN_RELEASE_ROUTE' // 总人解
|
||||||
];
|
// ];
|
||||||
console.log(buttonOperation, this.Signal.humanTrainRoute.button.operation, '9999');
|
|
||||||
if (buttonOperation && this.commandTypeList.includes(model._type)) {
|
if (buttonOperation && this.commandTypeList.includes(model._type)) {
|
||||||
if (buttonOperation === this.MixinCommand.totalCancel.button.operation) {
|
if (buttonOperation === this.MixinCommand.totalCancel.button.operation) {
|
||||||
this.handelTotalCancel(model);
|
this.handelTotalCancel(model);
|
||||||
@ -797,49 +788,54 @@ export default {
|
|||||||
this.reopenSignalOperation(model);
|
this.reopenSignalOperation(model);
|
||||||
} else if (buttonOperation === this.Signal.guide.button.operation) {
|
} else if (buttonOperation === this.Signal.guide.button.operation) {
|
||||||
this.handleGuideSignal(model);
|
this.handleGuideSignal(model);
|
||||||
|
} else if (buttonOperation === this.MixinCommand.functionButton.button.operation) {
|
||||||
|
this.assistOperateOrChange(model);
|
||||||
|
} else if (buttonOperation === this.MixinCommand.block.button.operation) {
|
||||||
|
this.handleDeviceBlockOrUnblock(model);
|
||||||
} else {
|
} else {
|
||||||
this.clearOperate();
|
this.clearOperate();
|
||||||
}
|
}
|
||||||
} else if (!buttonOperation) {
|
} else if (!buttonOperation) {
|
||||||
const signalButtonList = ['ASSIST', 'CHANGE_DIRECTION', 'PICK_ASSIST', 'DEPART_ASSIST', 'OCCLUSION', 'RECOVERY', 'ACCIDENT'];
|
// const signalButtonList = ['ASSIST', 'CHANGE_DIRECTION', 'PICK_ASSIST', 'DEPART_ASSIST', 'OCCLUSION', 'RECOVERY', 'ACCIDENT'];
|
||||||
// if (model._type === 'SignalButton' && !this.checkSignalBlock(model.signalCode) && model.type === 'GUIDE') {
|
// if (model._type === 'SignalButton' && !this.checkSignalBlock(model.signalCode) && model.type === 'GUIDE') {
|
||||||
// this.handleGuideSignal(model);
|
// this.handleGuideSignal(model);
|
||||||
// } else
|
// } else
|
||||||
if (model._type === 'SignalButton' && signalButtonList.includes(model.type)) {
|
// if (model._type === 'SignalButton' && signalButtonList.includes(model.type)) {
|
||||||
// 改方操作 总辅助操作 接辅助操作 发辅助操作
|
// // 改方操作 总辅助操作 接辅助操作 发辅助操作
|
||||||
this.assistOperateOrChange(model);
|
// this.assistOperateOrChange(model);
|
||||||
} else if (model._type === 'SignalButton' && signalButtonOperation.includes(model.type)) {
|
// } else if (model._type === 'SignalButton' && signalButtonOperation.includes(model.type)) {
|
||||||
this.pressedSignalButton = model;
|
// this.pressedSignalButton = model;
|
||||||
const { lamp } = model.instance.style.SwitchFault;
|
// const { lamp } = model.instance.style.SwitchFault;
|
||||||
// 总定总反单锁解锁单封解封
|
// // 总定总反单锁解锁单封解封
|
||||||
if (model.type === 'LOCATE') {
|
// if (model.type === 'LOCATE') {
|
||||||
this.buttonDown(this.Switch.locate.button.operation, ['Switch', 'SwitchFault'], lamp.controlColor);
|
// this.buttonDown(this.Switch.locate.button.operation, ['Switch', 'SwitchFault'], lamp.controlColor);
|
||||||
} else if (model.type === 'REVERSE') {
|
// } else if (model.type === 'REVERSE') {
|
||||||
this.buttonDown(this.Switch.reverse.button.operation, ['Switch', 'SwitchFault'], lamp.reverseColor);
|
// this.buttonDown(this.Switch.reverse.button.operation, ['Switch', 'SwitchFault'], lamp.reverseColor);
|
||||||
} else if (model.type === 'MONOLOCK') {
|
// } else if (model.type === 'MONOLOCK') {
|
||||||
this.buttonDown(this.Switch.lock.button.operation, ['Switch', 'SwitchFault'], lamp.lockColor);
|
// this.buttonDown(this.Switch.lock.button.operation, ['Switch', 'SwitchFault'], lamp.lockColor);
|
||||||
} else if (model.type === 'UNLOCK') {
|
// } else if (model.type === 'UNLOCK') {
|
||||||
this.buttonDown(this.Switch.unlock.button.operation, ['Switch', 'SwitchFault'], lamp.controlColor);
|
// this.buttonDown(this.Switch.unlock.button.operation, ['Switch', 'SwitchFault'], lamp.controlColor);
|
||||||
} else if (model.type === 'BLOCK') {
|
// } else if (model.type === 'BLOCK') {
|
||||||
this.buttonDown(this.Switch.block.button.operation, ['Switch', 'SwitchFault'], lamp.blockColor);
|
// this.buttonDown(this.Switch.block.button.operation, ['Switch', 'SwitchFault'], lamp.blockColor);
|
||||||
} else if (model.type === 'UNBLOCK') {
|
// } else if (model.type === 'UNBLOCK') {
|
||||||
this.buttonDown(this.Switch.unblock.button.operation, ['Switch', 'SwitchFault'], lamp.controlColor);
|
// this.buttonDown(this.Switch.unblock.button.operation, ['Switch', 'SwitchFault'], lamp.controlColor);
|
||||||
} else if (model.type === 'SECTION_FAULT_UNLOCK') {
|
// } else if (model.type === 'SECTION_FAULT_UNLOCK') {
|
||||||
// 区故解
|
// // 区故解
|
||||||
this.buttonDown(this.Section.fault.button.operation, ['Section'], lamp.faultColor);
|
// this.buttonDown(this.Section.fault.button.operation, ['Section'], lamp.faultColor);
|
||||||
} else if (model.type === 'CANCEL') {
|
// } else if (model.type === 'CANCEL') {
|
||||||
// 总取消
|
// // 总取消
|
||||||
this.buttonDown(this.MixinCommand.totalCancel.button.operation, ['Signal', 'SignalButton']);
|
// this.buttonDown(this.MixinCommand.totalCancel.button.operation, ['Signal', 'SignalButton']);
|
||||||
} else if (model.type === 'HUMAN_RELEASE_ROUTE') {
|
// } else if (model.type === 'HUMAN_RELEASE_ROUTE') {
|
||||||
// 总人解
|
// // 总人解
|
||||||
this.buttonDown(this.Signal.humanTrainRoute.button.operation, ['Signal', 'SignalButton']);
|
// this.buttonDown(this.Signal.humanTrainRoute.button.operation, ['Signal', 'SignalButton']);
|
||||||
}
|
// }
|
||||||
} else if ((model._type === 'SignalButton' && !this.checkSignalBlock(model.signalCode)) || (model._type === 'Signal' && !model.blockade)) {
|
// } else if ((model._type === 'SignalButton' && !this.checkSignalBlock(model.signalCode)) || (model._type === 'Signal' && !model.blockade)) {
|
||||||
this.deviceList.push(model);
|
// this.deviceList.push(model);
|
||||||
this.arrangementRouteOperation(this.deviceList);
|
// this.arrangementRouteOperation(this.deviceList);
|
||||||
} else {
|
// } else {
|
||||||
this.clearOperate();
|
// this.clearOperate();
|
||||||
}
|
// }
|
||||||
|
this.clearOperate();
|
||||||
} else {
|
} else {
|
||||||
this.clearOperate();
|
this.clearOperate();
|
||||||
}
|
}
|
||||||
@ -856,7 +852,26 @@ export default {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
handleDeviceBlockOrUnblock(model) {
|
||||||
|
const operate = {
|
||||||
|
over: true,
|
||||||
|
code: model.code,
|
||||||
|
operation: this.MixinCommand.block.button.operation
|
||||||
|
};
|
||||||
|
if (model && model._type === 'Section') {
|
||||||
|
operate.cmdType = model.blockade ? CMD.Section.CMD_SECTION_UNBLOCK : CMD.Section.CMD_SECTION_BLOCK;
|
||||||
|
operate.param = { sectionCode: model.code };
|
||||||
|
} else if (model && model._type === 'Signal') {
|
||||||
|
operate.cmdType = model.blockade ? CMD.Signal.CMD_SIGNAL_UNBLOCK : CMD.Signal.CMD_SIGNAL_BLOCK;
|
||||||
|
operate.param = { signalCode: model.code };
|
||||||
|
} else if (model && model._type === 'Switch') {
|
||||||
|
operate.cmdType = model.blockade ? CMD.Switch.CMD_SWITCH_UNBLOCK : CMD.Switch.CMD_SWITCH_BLOCK;
|
||||||
|
operate.param = { switchCode: model.code };
|
||||||
|
}
|
||||||
|
this.sendCommand(operate);
|
||||||
|
},
|
||||||
clearOperate() { // 清除操作
|
clearOperate() { // 清除操作
|
||||||
|
console.log('************');
|
||||||
this.clearSignalButton();
|
this.clearSignalButton();
|
||||||
this.deviceList = [];
|
this.deviceList = [];
|
||||||
Handler.clear(); // 清空操作组
|
Handler.clear(); // 清空操作组
|
||||||
@ -889,6 +904,7 @@ export default {
|
|||||||
param: {
|
param: {
|
||||||
labelEnum: model.labelEnum,
|
labelEnum: model.labelEnum,
|
||||||
stationCode: model.stationCode,
|
stationCode: model.stationCode,
|
||||||
|
_COUNT: model.code,
|
||||||
pressDown: model.pressDown ? 0 : 1 // 1按下、0弹起
|
pressDown: model.pressDown ? 0 : 1 // 1按下、0弹起
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -899,6 +915,7 @@ export default {
|
|||||||
param: {
|
param: {
|
||||||
labelEnum: model.labelEnum,
|
labelEnum: model.labelEnum,
|
||||||
stationCode: model.stationCode,
|
stationCode: model.stationCode,
|
||||||
|
_COUNT: model.code,
|
||||||
pressDown: model.pressDown ? 0 : 1 // 1按下、0弹起
|
pressDown: model.pressDown ? 0 : 1 // 1按下、0弹起
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -959,38 +976,34 @@ export default {
|
|||||||
param: noPasswordModelTypeMap[model.type].param,
|
param: noPasswordModelTypeMap[model.type].param,
|
||||||
cmdType: noPasswordModelTypeMap[model.type].nextCmdType
|
cmdType: noPasswordModelTypeMap[model.type].nextCmdType
|
||||||
};
|
};
|
||||||
this.$store
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
.dispatch('training/nextNew', operate)
|
if (valid) {
|
||||||
.then(({ valid }) => {
|
this.clearOperate();
|
||||||
if (valid) {
|
} else {
|
||||||
this.clearOperate();
|
|
||||||
} else {
|
|
||||||
this.$refs.noticeInfo.doShow();
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch(error => {
|
|
||||||
console.error(error);
|
|
||||||
this.$refs.noticeInfo.doShow();
|
this.$refs.noticeInfo.doShow();
|
||||||
});
|
}
|
||||||
|
}).catch(error => {
|
||||||
|
console.error(error);
|
||||||
|
this.clearOperate();
|
||||||
|
this.$refs.noticeInfo.doShow();
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
const operate = {
|
const operate = {
|
||||||
operation: modelTypeMap[model.type].operation,
|
operation: modelTypeMap[model.type].operation,
|
||||||
code: model.code,
|
code: model.code,
|
||||||
param: modelTypeMap[model.type].param
|
param: modelTypeMap[model.type].param
|
||||||
};
|
};
|
||||||
this.$store
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
.dispatch('training/nextNew', operate)
|
if (valid) {
|
||||||
.then(({ valid }) => {
|
operate.nextCmdType = modelTypeMap[model.type].nextCmdType;
|
||||||
if (valid) {
|
operate['operateNext'] = this.Command.close.password.operation;
|
||||||
operate.nextCmdType = modelTypeMap[model.type].nextCmdType;
|
this.$refs.password.doShow(operate);
|
||||||
operate['operateNext'] = this.Command.close.password.operation;
|
}
|
||||||
this.$refs.password.doShow(operate);
|
}).catch(error => {
|
||||||
}
|
console.error(error);
|
||||||
})
|
this.clearOperate();
|
||||||
.catch(error => {
|
this.$refs.noticeInfo.doShow();
|
||||||
console.error(error);
|
});
|
||||||
this.$refs.noticeInfo.doShow();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -102,7 +102,8 @@ export default {
|
|||||||
'PickArrow',
|
'PickArrow',
|
||||||
'DepartArrow',
|
'DepartArrow',
|
||||||
'ThroatRoute',
|
'ThroatRoute',
|
||||||
'NoStatusLamp'
|
'NoStatusLamp',
|
||||||
|
'Counter'
|
||||||
],
|
],
|
||||||
noNameTypeList: ['FaultStatusGroup', 'ModeStatusGroup', 'LampFilament', 'ReturnModeGroup', 'ControlSwitch', 'Axle'],
|
noNameTypeList: ['FaultStatusGroup', 'ModeStatusGroup', 'LampFilament', 'ReturnModeGroup', 'ControlSwitch', 'Axle'],
|
||||||
typeList: [
|
typeList: [
|
||||||
@ -136,7 +137,8 @@ export default {
|
|||||||
{ name: '接车箭头', value: 'PickArrow' },
|
{ name: '接车箭头', value: 'PickArrow' },
|
||||||
{ name: '发车箭头', value: 'DepartArrow' },
|
{ name: '发车箭头', value: 'DepartArrow' },
|
||||||
{ name: '咽喉进路表示', value: 'ThroatRoute' },
|
{ name: '咽喉进路表示', value: 'ThroatRoute' },
|
||||||
{ name: '无状态替代灯', value: 'NoStatusLamp' }
|
{ name: '无状态替代灯', value: 'NoStatusLamp' },
|
||||||
|
{ name: '计数器', value: 'Counter' }
|
||||||
],
|
],
|
||||||
hasDirectionList: [
|
hasDirectionList: [
|
||||||
'SectionOccupied',
|
'SectionOccupied',
|
||||||
@ -228,6 +230,15 @@ export default {
|
|||||||
options: this.directionList,
|
options: this.directionList,
|
||||||
isHidden: !this.hasDirectionList.includes(this.editModel.type)
|
isHidden: !this.hasDirectionList.includes(this.editModel.type)
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
prop: 'counterType',
|
||||||
|
label: '计数器类型:',
|
||||||
|
type: 'select',
|
||||||
|
optionLabel: 'label',
|
||||||
|
optionValue: 'value',
|
||||||
|
options: [{label: '总人解', value: 'HumanSolution'}, {label: '区故解', value: 'FaultSection'}],
|
||||||
|
isHidden: this.editModel.type !== 'Counter'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
prop: 'switchCode',
|
prop: 'switchCode',
|
||||||
label: '所属道岔:',
|
label: '所属道岔:',
|
||||||
@ -405,6 +416,7 @@ export default {
|
|||||||
this.PickArrowList = [];
|
this.PickArrowList = [];
|
||||||
this.ThroatRouteList = [];
|
this.ThroatRouteList = [];
|
||||||
this.NoStatusLampList = [];
|
this.NoStatusLampList = [];
|
||||||
|
this.CounterList = [];
|
||||||
indicatorLightList.forEach(item => {
|
indicatorLightList.forEach(item => {
|
||||||
switch (item._type) {
|
switch (item._type) {
|
||||||
case 'AtsControl':
|
case 'AtsControl':
|
||||||
@ -500,6 +512,9 @@ export default {
|
|||||||
case 'NoStatusLamp':
|
case 'NoStatusLamp':
|
||||||
this.NoStatusLampList.push(item);
|
this.NoStatusLampList.push(item);
|
||||||
break;
|
break;
|
||||||
|
case 'Counter':
|
||||||
|
this.CounterList.push(item);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -598,6 +613,9 @@ export default {
|
|||||||
case 'NoStatusLamp':
|
case 'NoStatusLamp':
|
||||||
this.selectLists = this.NoStatusLampList;
|
this.selectLists = this.NoStatusLampList;
|
||||||
break;
|
break;
|
||||||
|
case 'Counter':
|
||||||
|
this.selectLists = this.CounterList;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
this.selectLists = this.intersiteControlList;
|
this.selectLists = this.intersiteControlList;
|
||||||
break;
|
break;
|
||||||
@ -719,6 +737,9 @@ export default {
|
|||||||
case 'NoStatusLamp':
|
case 'NoStatusLamp':
|
||||||
idPrefix = 'noStatusLamp';
|
idPrefix = 'noStatusLamp';
|
||||||
break;
|
break;
|
||||||
|
case 'Counter':
|
||||||
|
idPrefix = 'counter';
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
return idPrefix;
|
return idPrefix;
|
||||||
},
|
},
|
||||||
|
@ -212,7 +212,7 @@ export default {
|
|||||||
const controlLampTypeList = ['AtsControl', 'CenterCommunication', 'ChainControl', 'IntersiteControl', 'LeuControl', 'LocalControl', 'Maintain',
|
const controlLampTypeList = ['AtsControl', 'CenterCommunication', 'ChainControl', 'IntersiteControl', 'LeuControl', 'LocalControl', 'Maintain',
|
||||||
'SwitchFault', 'PowerSupply', 'NoOneReturn', 'MaintenanceLamps', 'ZcCommunication', 'FaultStatusGroup', 'ModeStatusGroup', 'LampFilament',
|
'SwitchFault', 'PowerSupply', 'NoOneReturn', 'MaintenanceLamps', 'ZcCommunication', 'FaultStatusGroup', 'ModeStatusGroup', 'LampFilament',
|
||||||
'ReturnModeGroup', 'ControlSwitch', 'Axle', 'IndicatorLight', 'SectionOccupied', 'AssistStatus', 'TotalAssist', 'DepartAssist', 'PickAssist',
|
'ReturnModeGroup', 'ControlSwitch', 'Axle', 'IndicatorLight', 'SectionOccupied', 'AssistStatus', 'TotalAssist', 'DepartAssist', 'PickAssist',
|
||||||
'Recovery', 'Accident', 'Occlusion', 'PickArrow', 'DepartArrow', 'ThroatRoute', 'NoStatusLamp'];
|
'Recovery', 'Accident', 'Occlusion', 'PickArrow', 'DepartArrow', 'ThroatRoute', 'NoStatusLamp', 'Counter'];
|
||||||
const type = device._type;
|
const type = device._type;
|
||||||
if (this.selectDevice) {
|
if (this.selectDevice) {
|
||||||
this.enabledTab = this.selectDevice;
|
this.enabledTab = this.selectDevice;
|
||||||
|
@ -205,6 +205,7 @@ class Model {
|
|||||||
this.switchCode = '';
|
this.switchCode = '';
|
||||||
this.labelEnum = '';
|
this.labelEnum = '';
|
||||||
this.right = false;
|
this.right = false;
|
||||||
|
this.counterType = '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user