Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
40a367a005
@ -558,15 +558,29 @@ export default class Switch extends Group {
|
||||
return this.name.getBoundingRect();
|
||||
}
|
||||
|
||||
getShapeTipPoint() {
|
||||
const text = this.name.getNameText();
|
||||
getShapeTipPoint(opts) {
|
||||
let rect;
|
||||
let text;
|
||||
|
||||
switch (opts.subDeviceType) {
|
||||
case 'enabled':
|
||||
rect = this.enabledName.getBoundingRect();
|
||||
break;
|
||||
default:
|
||||
text = this.name.getNameText();
|
||||
if (text) {
|
||||
const rect = text.getBoundingRect();
|
||||
rect = text.getBoundingRect();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (rect) {
|
||||
return {
|
||||
x: rect.x + rect.width / 2,
|
||||
y: rect.y
|
||||
};
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -481,6 +481,11 @@ export function commitOperate(operate, paramList, over, val) {
|
||||
step.over = true;
|
||||
step.cmdType = operate.cmdType;
|
||||
}
|
||||
if (over == 4) {
|
||||
const codeList = Object.values(paramList);
|
||||
step.code = codeList[0];
|
||||
}
|
||||
|
||||
return new Promise(function(resolve, reject) {
|
||||
store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
|
@ -229,7 +229,6 @@ export default {
|
||||
operate = {
|
||||
send: true,
|
||||
operation: eachCmd.operation.code,
|
||||
cmdType: eachCmd.cmdType,
|
||||
param: eachCmd.param // 请求栈中参数配置
|
||||
};
|
||||
const deviceStatus = {code: eachCmd.device.code, _type: eachCmd.device._type, isCiConfirm: 0};
|
||||
|
@ -131,7 +131,12 @@ export default {
|
||||
const eachCmd = requestList[0];
|
||||
let operate = '';
|
||||
if (eachCmd.ciConfirm) {
|
||||
operate = {
|
||||
operate = eachCmd.nextStepNotEnd
|
||||
? {
|
||||
operation: eachCmd.operation.code,
|
||||
param: eachCmd.param // 请求栈中参数配置
|
||||
}
|
||||
: {
|
||||
code: eachCmd.device.code,
|
||||
operation: eachCmd.operation.code,
|
||||
param: eachCmd.param // 请求栈中参数配置
|
||||
|
@ -415,8 +415,8 @@ export default {
|
||||
this.$store.dispatch('menuOperation/pushRequestList', {
|
||||
device: this.selected,
|
||||
operation: { code: OperationEvent.Command.commandXian.confirm.operation, name: '终端信号解封'},
|
||||
ciConfirm: true,
|
||||
param: {signalCode: this.selected.code}
|
||||
param: {signalCode: this.selected.code},
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK
|
||||
});
|
||||
this.$store.dispatch('training/updateMapState', [{code: this.selected.code, _type: 'Signal', isRequestLock: 1}]);
|
||||
} else {
|
||||
|
@ -294,7 +294,7 @@ export default {
|
||||
this.$store.dispatch('menuOperation/pushRequestList', {
|
||||
device: this.selected,
|
||||
operation: { code: OperationEvent.Command.commandXian.confirm.operation, name: '道岔解锁'},
|
||||
// cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK,
|
||||
nextStepNotEnd: true,
|
||||
ciConfirm: true,
|
||||
param: operate.param
|
||||
});
|
||||
@ -326,14 +326,25 @@ export default {
|
||||
// });
|
||||
// },
|
||||
enabledConfirm() {
|
||||
const step = {
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Switch.unlock.menu.operation,
|
||||
subType: 'enabled',
|
||||
params: {switchCode:this.selected.code}
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/pushRequestList', {
|
||||
device: this.selected,
|
||||
operation: { code: OperationEvent.Switch.unlock.menu.operation, name: '道岔解锁'},
|
||||
operation: { code: OperationEvent.Command.commandXian.confirm.operation, name: '道岔解锁'},
|
||||
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK,
|
||||
param: {
|
||||
switchCode: this.selected.code
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
// 道岔钩锁
|
||||
hookLock() {
|
||||
|
@ -306,9 +306,9 @@ export default {
|
||||
trainingType: 'Switch',
|
||||
productTypes: ['01', '02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '02', orderNum: 1, operateCode: '104', tip: '鼠标右键菜单选择【道岔单解】' },
|
||||
{ deviceType: '02', orderNum: 1, operateCode: '104', tip: '鼠标右键菜单选择【道岔单解】', codeType:'SWITCH' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【发送请求】按钮' },
|
||||
{ deviceType: '02', orderNum: 3, operateCode: '104', tip: '鼠标右键点击【E】选择使能' },
|
||||
{ deviceType: '02', orderNum: 3, operateCode: '104', tip: '鼠标右键点击【E】选择使能', codeType:'SWITCH', subType:'enabled' },
|
||||
{ deviceType: '02', orderNum: 4, operateCode: '009', tip: '鼠标左键点击【发送请求】按钮' }
|
||||
]
|
||||
},
|
||||
@ -377,7 +377,7 @@ export default {
|
||||
operateType: 'Signal_Block',
|
||||
skinCode: '09',
|
||||
trainingName: '信号封锁({5})',
|
||||
trainingRemark: '信号封锁',
|
||||
trainingRemark: '信号封锁功能',
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['01', '02'],
|
||||
stepVOList: [
|
||||
@ -396,9 +396,7 @@ export default {
|
||||
productTypes: ['01', '02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '307', tip: '鼠标右键菜单选择【信号解封】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【发送请求】按钮' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '307', tip: '鼠标右键点击【E】选择使能' },
|
||||
{ deviceType: '04', orderNum: 4, operateCode: '009', tip: '鼠标左键点击【发送请求】按钮' }
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【发送请求】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -432,7 +430,7 @@ export default {
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: 'CMD_TRAIN_HOLD',
|
||||
operateType: 'Train_Hold',
|
||||
skinCode: '09',
|
||||
trainingName: '列车扣车({5})',
|
||||
trainingRemark: '列车扣车功能',
|
||||
@ -446,7 +444,7 @@ export default {
|
||||
{
|
||||
maxDuration: 15,
|
||||
minDuration: 8,
|
||||
operateType: 'CMD_TRAIN_CANCEL_HOLD',
|
||||
operateType: 'Train_Cancel_Hold',
|
||||
skinCode: '09',
|
||||
trainingName: '列车放行({5})',
|
||||
trainingRemark: '列车放行功能',
|
||||
|
@ -30,6 +30,7 @@ class ValidateHandler {
|
||||
judge (operate) {
|
||||
const steps = Handler.getSteps();
|
||||
const order = Handler.getOrder();
|
||||
|
||||
let valid = false;
|
||||
if (operate.over && steps.length == 1) { // 右键菜单直接发送校验
|
||||
if (operate && steps[0] &&
|
||||
|
Loading…
Reference in New Issue
Block a user