调整步骤运行数据

This commit is contained in:
zyy 2020-03-30 10:28:08 +08:00
parent ba57262d2a
commit 0321340863
8 changed files with 44 additions and 31 deletions

View File

@ -214,14 +214,14 @@ 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})`, level: opts.intervalRunTime ? this.getLevelByTime(opts.intervalRunTime) : '0', time: opts.intervalRunTime ? opts.intervalRunTime : 0, check: opts.intervalRunTimeValidStatus });
this.tempData.push({ name: `${stationStand.name}(${station.name})`, level: opts.intervalRunTime ? this.getLevelByTime(opts.intervalRunTime) : '0', time: opts.intervalRunTime ? opts.intervalRunTime : 0, check: opts.intervalRunTimeValidStatus ? opts.intervalRunTimeValidStatus : true });
}
} 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})`, level: opts.intervalRunTime ? this.getLevelByTime(opts.intervalRunTime) : '0', time: opts.intervalRunTime ? opts.intervalRunTime : 0, check: opts.intervalRunTimeValidStatus });
this.tempData.push({ name: `${stationStand.name}(${station.name})`, level: opts.intervalRunTime ? this.getLevelByTime(opts.intervalRunTime) : '0', time: opts.intervalRunTime ? opts.intervalRunTime : 0, check: opts.intervalRunTimeValidStatus ? opts.intervalRunTimeValidStatus : true });
}
}
},
@ -312,9 +312,11 @@ export default {
commit() {
if (this.isConfirm) {
this.loading = true;
commitOperate(menuOperate.StationStand.setRunLevel, {runLevelTime: this.time, runLevelTimeForever: !!this.tempData[0].check}, 2).then((data)=>{
commitOperate(menuOperate.StationStand.setRunLevel, {runLevelTime: Number(this.time), runLevelTimeForever: !!this.tempData[0].check}, 2).then(({ valid })=>{
this.loading = false;
this.doClose();
if (valid) {
this.doClose();
}
}).catch((error) => {
this.loading = false;
this.doClose();

View File

@ -211,9 +211,11 @@ export default {
// },
commit() {
this.loading = true;
commitOperate(menuOperate.StationStand.setStopTime, {parkingTime: this.control == '01' ? -1 : 1, parkingAlwaysValid: this.effective == '1'}, 2).then((data)=>{
commitOperate(menuOperate.StationStand.setStopTime, {parkingTime: this.control == '01' ? -1 : 1, parkingAlwaysValid: this.effective == '1'}, 2).then(({ valid })=>{
this.loading = false;
this.doClose();
if (valid) {
this.doClose();
}
}).catch((error) => {
this.loading = false;
this.doClose();

View File

@ -285,8 +285,10 @@ export default {
// },
//
setJumpStop() {
commitOperate(menuOperate.StationStand.setJumpStop, {standCode:this.selected.code}, 0).then((data)=>{
this.$refs.standJumpStopControl.doShow(data.operate, this.selected);
commitOperate(menuOperate.StationStand.setJumpStop, {standCode:this.selected.code}, 0).then(({ valid, operate })=>{
if (valid) {
this.$refs.standJumpStopControl.doShow(operate, this.selected);
}
});
},
//
@ -303,8 +305,10 @@ export default {
},
//
setRunLevel() {
commitOperate(menuOperate.StationStand.setRunLevel, {standCode:this.selected.code}, 0).then((data)=>{
this.$refs.standRunLevel.doShow(data.operate, this.selected, []);
commitOperate(menuOperate.StationStand.setRunLevel, {standCode:this.selected.code}, 0).then(({ valid, operate })=>{
if (valid) {
this.$refs.standRunLevel.doShow(operate, this.selected, []);
}
});
},
//

View File

@ -223,8 +223,8 @@ export function commitOperate(operate, paramList, over) {
store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
store.dispatch('menuOperation/handleBreakFlag', { break: true });
resolve({operate:step});
}
resolve({ valid: valid, operate: step });
}).catch(error=>{
reject(error);
});

View File

@ -882,7 +882,7 @@ export const OperationList = {
productTypes: ['01', '02'], // 产品类型 01 现地 02 行调
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '502', tip: '鼠标右键菜单选择【设置跳停】' },
{ deviceType: '06', orderNum: 2, operateCode: '502', tip: '鼠标左键点击【确定】按钮', val: '{11}' }
{ deviceType: '06', orderNum: 2, operateCode: '502', tip: '鼠标左键点击【确定】按钮' }
]
},
{
@ -898,7 +898,7 @@ export const OperationList = {
{ deviceType: '06', orderNum: 1, operateCode: '502', tip: '鼠标右键菜单选择【设置跳停】' },
{ deviceType: '06', orderNum: 2, operateCode: '5024', tip: '鼠标左键点击' },
{ deviceType: '06', orderNum: 2, operateCode: '5022', tip: '请选择001号车', val: '001' },
{ deviceType: '06', orderNum: 2, operateCode: '502', tip: '鼠标左键点击【确定】按钮', val: '{11}::001' }
{ deviceType: '06', orderNum: 2, operateCode: '502', tip: '鼠标左键点击【确定】按钮' }
]
},
{
@ -912,7 +912,7 @@ export const OperationList = {
productTypes: ['01', '02'], // 产品类型 01 现地 02 行调
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '503', tip: '鼠标右键菜单选择【取消跳停】' },
{ deviceType: '06', orderNum: 2, operateCode: '503', tip: '鼠标左键点击【确定】按钮', val: '{11}' }
{ deviceType: '06', orderNum: 2, operateCode: '503', tip: '鼠标左键点击【确定】按钮' }
]
},
{
@ -928,7 +928,7 @@ export const OperationList = {
{ deviceType: '06', orderNum: 1, operateCode: '503', tip: '鼠标右键菜单选择【取消跳停】' },
{ deviceType: '06', orderNum: 2, operateCode: '5034', tip: '鼠标左键点击' },
{ deviceType: '06', orderNum: 2, operateCode: '5032', tip: '请选择001号车', val: '001' },
{ deviceType: '06', orderNum: 2, operateCode: '503', tip: '鼠标左键点击【确定】按钮', val: '{11}::001' }
{ deviceType: '06', orderNum: 2, operateCode: '503', tip: '鼠标左键点击【确定】按钮' }
]
},
{
@ -957,7 +957,7 @@ export const OperationList = {
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '509', tip: '鼠标右键菜单选择【停站时间控制】' },
{ deviceType: '06', orderNum: 2, operateCode: '5092', tip: '鼠标左键点击,选择【自动】', val: '01' },
{ deviceType: '06', orderNum: 3, operateCode: '509', tip: '鼠标左键点击【确认】按钮', val: '01::20::true' }
{ deviceType: '06', orderNum: 3, operateCode: '509', tip: '鼠标左键点击【确认】按钮' }
]
},
{
@ -973,7 +973,7 @@ export const OperationList = {
{ deviceType: '06', orderNum: 1, operateCode: '509', tip: '鼠标右键菜单选择【停站时间控制】' },
{ deviceType: '06', orderNum: 2, operateCode: '5092', tip: '鼠标左键点击,选择【人工】', val: '02' },
{ deviceType: '06', orderNum: 3, operateCode: '5094', tip: '输入或鼠标点击调整为【20】', val: '20' },
{ deviceType: '06', orderNum: 4, operateCode: '509', tip: '鼠标左键点击【确认】按钮', val: '02::20::true' }
{ deviceType: '06', orderNum: 4, operateCode: '509', tip: '鼠标左键点击【确认】按钮' }
]
},
{
@ -990,7 +990,7 @@ export const OperationList = {
{ deviceType: '06', orderNum: 2, operateCode: '5092', tip: '鼠标左键点击,选择【人工】', val: '02' },
{ deviceType: '06', orderNum: 3, operateCode: '5094', tip: '输入或鼠标点击调整为【20】', val: '20' },
{ deviceType: '06', orderNum: 4, operateCode: '5093', tip: '鼠标左键点击,选择【一次有效】', val: 'false' },
{ deviceType: '06', orderNum: 5, operateCode: '509', tip: '鼠标左键点击【确认】按钮', val: '02::20::false' }
{ deviceType: '06', orderNum: 5, operateCode: '509', tip: '鼠标左键点击【确认】按钮' }
]
},
{
@ -1006,7 +1006,7 @@ export const OperationList = {
{ deviceType: '06', orderNum: 1, operateCode: '510', tip: '鼠标右键菜单选择【运行时间控制】' },
{ deviceType: '06', orderNum: 2, operateCode: '5104', tip: '鼠标左键点击选择【1】', val: '1' },
{ deviceType: '06', orderNum: 3, operateCode: '5101', tip: '鼠标左键点击选择【115】', val: '115' },
{ deviceType: '06', orderNum: 4, operateCode: '510', tip: '鼠标左键点击【确认】按钮', val: '115::true' }
{ deviceType: '06', orderNum: 4, operateCode: '510', tip: '鼠标左键点击【确认】按钮' }
]
},
{
@ -1023,7 +1023,7 @@ export const OperationList = {
{ deviceType: '06', orderNum: 2, operateCode: '5104', tip: '鼠标左键点击选择【1】', val: '1' },
{ deviceType: '06', orderNum: 3, operateCode: '5101', tip: '鼠标左键点击选择【115】', val: '115' },
{ deviceType: '06', orderNum: 4, operateCode: '5103', tip: '鼠标左键点击,取消选择【一直有效】', val: 'false' },
{ deviceType: '06', orderNum: 5, operateCode: '510', tip: '鼠标左键点击【确认】按钮', val: '115::false' }
{ deviceType: '06', orderNum: 5, operateCode: '510', tip: '鼠标左键点击【确认】按钮' }
]
},
{
@ -1052,7 +1052,7 @@ export const OperationList = {
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '511', tip: '鼠标右键菜单选择【变通策略管理】' },
{ deviceType: '06', orderNum: 2, operateCode: '5111', tip: '鼠标左键点击,选择【无折返】', val: '01' },
{ deviceType: '06', orderNum: 3, operateCode: '511', tip: '鼠标左键点击【确定】按钮', val: '01' }
{ deviceType: '06', orderNum: 3, operateCode: '511', tip: '鼠标左键点击【确定】按钮' }
]
},
@ -1099,7 +1099,7 @@ export const OperationList = {
{ deviceType: '03', orderNum: 3, operateCode: '4071', tip: '鼠标左键点击【下达】按钮' },
{ deviceType: '03', orderNum: 4, operateCode: '4072', tip: '鼠标左键点击【确认】按钮' },
{ deviceType: '03', orderNum: 5, operateCode: '4073', tip: '鼠标左键点击【确认1】按钮' },
{ deviceType: '03', orderNum: 6, operateCode: '4074', tip: '鼠标左键点击【确认2】按钮', val: '15' },
{ deviceType: '03', orderNum: 6, operateCode: '4074', tip: '鼠标左键点击【确认2】按钮' },
{ deviceType: '03', orderNum: 7, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' }
]
},
@ -1167,7 +1167,7 @@ export const OperationList = {
{ deviceType: '02', orderNum: 3, operateCode: '1131', tip: '鼠标左键点击【下达】按钮' },
{ deviceType: '02', orderNum: 4, operateCode: '1132', tip: '鼠标左键点击【确认】按钮' },
{ deviceType: '02', orderNum: 5, operateCode: '1133', tip: '鼠标左键点击【确认1】按钮' },
{ deviceType: '02', orderNum: 6, operateCode: '1134', tip: '鼠标左键点击【确认2】按钮', val: '35' },
{ deviceType: '02', orderNum: 6, operateCode: '1134', tip: '鼠标左键点击【确认2】按钮' },
{ deviceType: '02', orderNum: 7, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' }
]
},
@ -2799,7 +2799,7 @@ export const OperationList = {
{ deviceType: '06', orderNum: 2, operateCode: '5104', tip: '鼠标左键点击选择【1】', val: '1' },
{ deviceType: '06', orderNum: 3, operateCode: '5101', tip: '鼠标左键点击选择【115】', val: '115' },
{ deviceType: '06', orderNum: 4, operateCode: '5103', tip: '鼠标左键点击,选择【一直有效】', val: 'true' },
{ deviceType: '06', orderNum: 4, operateCode: '510', tip: '鼠标左键点击【确认】按钮', val: '115::true' }
{ deviceType: '06', orderNum: 4, operateCode: '510', tip: '鼠标左键点击【确认】按钮' }
]
}
]

View File

@ -99,7 +99,7 @@ class Handler {
this.afterValid(operation, valid);
rtn.valid = valid;
if (operation.cmdType) {
if (operation.cmdType && valid) {
const command = this.getCommand(operation);
if (command) {
CommandHandler.execute(command.id, command.get()).then(response => {

View File

@ -52,15 +52,20 @@ class ValidateHandler {
const order = Handler.getOrder();
let valid = false;
if (operate.over && steps.length == 1) {
if (operate.over && steps.length == 1) { // 右键菜单直接发送校验
if (operate && steps[0] &&
operate.code == steps[0].code &&
operate.operation == steps[0].operation) {
valid = true;
}
} else if (operate.over) { // 最后一步不用校验 只校验之前的步骤信息 最后直接发送就可以
valid = true;
} else if (order < steps.length) {
} else if (operate.over) { // 最后一步校验
const standard = steps[order];
if (operate && standard &&
operate.operation == standard.operation &&
operate.val == standard.val) {
valid = true;
}
} else if (order < steps.length) { // 普通步骤信息校验
const standard = steps[order];
if (operate && standard &&
operate.code == standard.code &&

View File

@ -3,11 +3,11 @@ export function getBaseUrl() {
let BASE_API;
if (process.env.NODE_ENV === 'development') {
// BASE_API = 'https://joylink.club/jlcloud';
BASE_API = 'https://test.joylink.club/jlcloud';
// BASE_API = 'https://test.joylink.club/jlcloud';
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪
// BASE_API = 'http://192.168.3.6:9000'; // 旭强
// BASE_API = 'http://192.168.3.41:9000'; // 张赛
// BASE_API = 'http://192.168.3.82:9000'; // 杜康
BASE_API = 'http://192.168.3.82:9000'; // 杜康
// BASE_API = 'http://b29z135112.zicp.vip';
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
// BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛