This commit is contained in:
sunzhenyu 2020-12-23 18:04:04 +08:00
commit d3d7b0d330
46 changed files with 733 additions and 634 deletions

View File

@ -98,7 +98,7 @@ export function createPost(data) {
data
});
}
// 修改留言板
// 修改留言板名称
export function updatePost(postId, data) {
return request({
url: `/api/learn/${postId}`,

View File

@ -214,7 +214,21 @@ export function duplicateService(data) {
data: data
});
}
// 平移计划
export function movePlaningService(data) {
return request({
url: `/api/runPlan/draft/${data.planId}/service/${data.serviceNumber}/move`,
method: 'put',
data: data
});
}
// 清除数据
export function clearPlaningData(planId) {
return request({
url: `/api/runPlan/draft/${planId}/data`,
method: 'delete'
});
}
/** 增加任务*/
export function addPlanTrip(data) {
return request({

View File

@ -210,6 +210,13 @@ class SkinCode extends defaultStyle {
},
lowButton:{
display: false // 现地 信号机按钮
},
sigBack: {
fillColor:'rgba(0,0,0,0)', // 信号背景颜色
strokecolor:'#F00', // 信号描边颜色
lineWidth: 1, // 信号背景描边宽度
distanceX: 2, // 信号背景x偏移距离
distanceY: 1 // 信号背景Y偏移距离
}
};

View File

@ -211,7 +211,8 @@ class SkinCode extends defaultStyle {
display: false // 现地 信号机按钮
},
sigBack: {
color: '#669999', // 信号背景颜色
fillColor:'#669999', // 信号背景颜色
strokecolor:'#669999', // 信号描边颜色
lineWidth: 0, // 信号背景描边宽度
distanceX: 2, // 信号背景x偏移距离
distanceY: 1 // 信号背景Y偏移距离

View File

@ -54,12 +54,6 @@ export default class Line2 extends Group {
}
}
getBoundingRect() {
if (this.segment) {
return this.segment.getBoundingRect().clone();
}
}
setState(model) {
if (!this.isShowShape) return;
this.setLineType(model.type);

View File

@ -173,7 +173,8 @@ class Signal extends Group {
},
style: {
lineWidth: style.Signal.sigBack.lineWidth,
fill: style.Signal.sigBack.color
fill: style.Signal.sigBack.fillColor,
stroke: style.Signal.sigBack.strokecolor
}
});
this.add(this.sigBack);

View File

@ -93,9 +93,9 @@ class ESolidStand extends Group {
handlePassagerColor(num) {
if (num && num > 0) {
const passagerNum = parseInt(num);
if (passagerNum < 40) {
if (passagerNum < 400) {
this.setColor('#29a909');
} else if (passagerNum < 80 && passagerNum >= 40) {
} else if (passagerNum < 800 && passagerNum >= 400) {
this.setColor('#ffa500');
} else {
this.setColor('#F00');

View File

@ -159,7 +159,8 @@ export default class Switch extends Group {
_subType: 'enabled', // 标识
style: {
x: nameTextX,
y: nameTextY + directy * 20,
// y: nameTextY + directy * 20,
y: nameTextY + 20,
fontSize: 12,
text: 'E',
textAlign: 'center',

View File

@ -384,11 +384,11 @@ export default class Train extends Group {
if (num) {
// && num > 0
const passagerNum = parseInt(num);
if (passagerNum < 100) {
if (passagerNum < 400) {
this.trainB && this.trainB.setTrainColor('#29a909');
this.trainL && this.trainL.setColor('#29a909');
this.trainR && this.trainR.setColor('#29a909');
} else if (passagerNum < 200 && passagerNum >= 100) {
} else if (passagerNum < 1000 && passagerNum >= 400) {
this.trainB && this.trainB.setTrainColor('#ffa500');
this.trainL && this.trainL.setColor('#ffa500');
this.trainR && this.trainR.setColor('#ffa500');

View File

@ -116,7 +116,7 @@ export default {
},
title() {
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
return '进路人工控';
return '进路人工控';
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
return '进路交自动控';
}

View File

@ -127,7 +127,7 @@ export default {
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.choose.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menu.domId : '';
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.confirm.domId : '';
},
title() {
return '办理进路';
@ -262,10 +262,10 @@ export default {
commit() {
if (this.row && this.row.canSetting) {
this.loading = true;
commitOperate(menuOperate.Signal.arrangementRoute, {routeCode: this.row.code}, 1).then(({valid, operate})=>{
commitOperate({operation:OperationEvent.Signal.arrangementRoute.confirm.operation}, {routeCode: this.row.code}, 1).then(({valid, operate})=>{
this.loading = false;
if (valid) {
this.$refs.passwordBox.doShow(operate);
this.$refs.passwordBox.doShow({operation:OperationEvent.Signal.arrangementRoute.menu.operation});
this.doClose();
}
}).catch((error) => {

View File

@ -139,8 +139,7 @@ export default {
offset: {},
commandTypeList: [],
cmdTypeList: [],
deviceList: [],
routeListFilter: []
deviceList: []
};
},
computed: {
@ -268,18 +267,28 @@ export default {
}
},
buttonDown(operation, commandTypeList) {
//
this.deviceList = [];
if (operation != this.Command.cancel.clearMbm.operation) {
const operate = {
operation: operation
};
const operationList = [this.Signal.humanTrainRoute.button.operation, this.Section.fault.button.operation, this.Switch.unlock.button.operation, this.MixinCommand.unblock.button.operation, this.Station.guideLock.button.operation, this.MixinCommand.totalCancel.button.operation];
//
const operationList = [this.Signal.humanTrainRoute.button.operation,
this.Section.fault.button.operation,
this.Switch.unlock.button.operation,
this.MixinCommand.unblock.button.operation,
this.Station.guideLock.button.operation
// this.MixinCommand.totalCancel.button.operation
];
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.operation = operation;
this.commandTypeList = commandTypeList;
this.$store.dispatch('menuOperation/setButtonOperation', operation); //
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
//
if (operationList.includes(operation)) {
operate['operateNext'] = this.Command.close.password.operation;
this.$refs.password.doShow(operate);
@ -302,27 +311,24 @@ export default {
});
}
},
arrangementRouteOperation(deviceList) { //
// OR
arrangementRouteOperation(deviceList) {
const operate = {
operation: this.$store.state.menuOperation.buttonOperation
};
let isArrangementRoute = false;
if (deviceList.length === 1) {
this.routeListFilter = [];
this.routeList.forEach(item => {
if (item.startSignalCode === deviceList[0].code) {
this.routeListFilter.push(item);
}
});
const signal = this.$store.getters['map/getDeviceByCode'](deviceList[0].code);
const signal = deviceList[0];
const sectionModel = this.$store.getters['map/getDeviceByCode'](signal.sectionCode);
if (sectionModel) {
//
const sectionLeft = this.$store.getters['map/getDeviceByCode'](sectionModel.leftSectionCode);
const sectionRight = this.$store.getters['map/getDeviceByCode'](sectionModel.rightSectionCode);
if (sectionLeft.routeLock || sectionRight.routeLock) {
isArrangementRoute = true;
}
}
//
if (signal.redOpen && !signal.greenOpen && !signal.yellowOpen && isArrangementRoute) { //
operate.over = true;
operate.cmdType = CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL;
@ -340,8 +346,10 @@ export default {
}
} else if (deviceList.length === 2) {
let flag = false;
this.routeListFilter.forEach(item => {
if (item.endButtonSignalCode === deviceList[1].code) { //
this.routeList.forEach(item => {
// item.endButtonSignalCode
//
if (item.startSignalCode === deviceList[0].code && item.endSignalCode === deviceList[1].code) {
operate.over = true;
operate.cmdType = CMD.Signal.CMD_SIGNAL_SET_ROUTE;
operate.code = deviceList[1].code;
@ -349,7 +357,6 @@ export default {
this.deviceList = [];
flag = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
this.routeListFilter = [];
}).catch(() => {
this.$refs.noticeInfo.doShow();
});
@ -357,12 +364,12 @@ export default {
});
if (!flag) {
this.deviceList = [];
this.$refs.noticeInfo.doShow('未找到选择进路!');
this.$refs.noticeInfo.doShow('未找到选择进路!');
}
}
},
handelFunctionButton(model, subType) {
debugger;
// debugger;
const operate = {
over: true,
operation: this.$store.state.menuOperation.buttonOperation,
@ -625,11 +632,16 @@ export default {
},
selectedChange() {
//
if (this.$store.state.training.prdType != '01') {
return '';
}
const buttonOperation = this.$store.state.menuOperation.buttonOperation;
const model = this.$store.state.menuOperation.selected; //
const subType = this.$store.state.menuOperation.subType; //
const switchOperation = [this.Switch.lock.button.operation, this.Switch.unlock.button.operation, this.Switch.locate.button.operation, this.Switch.reverse.button.operation];
if (!model._type && !model._code) {
return;
}
if (buttonOperation && buttonOperation === this.MixinCommand.functionButton.button.operation) {
this.handelFunctionButton(model, subType);
} else {
@ -638,6 +650,7 @@ export default {
if (station.controlMode == 'Local' || station.controlMode == 'Emergency') {
if (buttonOperation && this.commandTypeList.includes(model._type)) {
this.deviceList.push(model);
// debugger;
if (buttonOperation === this.Signal.arrangementRoute.button.operation) {
this.arrangementRouteOperation(this.deviceList);
} else if (buttonOperation === this.MixinCommand.totalCancel.button.operation) {
@ -664,6 +677,7 @@ export default {
}
} else {
this.clearOperate();
this.$messageBox('请先切换到站控或紧急站控');
}
}
}

View File

@ -336,10 +336,13 @@ export default {
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (data.operation === OperationEvent.Signal.guide.menu.operation) {
switch (data.operation) {
case OperationEvent.Signal.guide.menu.operation:
this.$refs.routeGuide.doShow(data, data.selected, data.routesList);
} else if (data.operation === OperationEvent.Signal.humanTrainRoute.menu.operation) {
break;
case OperationEvent.Signal.humanTrainRoute.menu.operation:
this.$refs.routeControl.doShow(data, data.selected);
break;
}
}
});

View File

@ -85,7 +85,7 @@ export default {
cmdType: CMD.Stand.CMD_STAND_SET_RUN_TIME
},
{
label: '属性',
label: '显示站台信息',
handler: this.detail,
cmdType: CMD.Stand.CMD_STAND_VIEW_STATUS
}

View File

@ -187,7 +187,6 @@ export default {
this.menu = [...this.menuDirective];
}
}
},
doShow(point) {
this.clickEvent();

View File

@ -24,7 +24,7 @@ export default {
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '301', tip: '鼠标右键菜单选择【办理进路】' },
{ deviceType: '04', orderNum: 2, operateCode: '3011', tip: '鼠标左键选择进路名称【{3}】', val: '{4}' },
{ deviceType: '04', orderNum: 3, operateCode: '301', tip: '鼠标左键点击【执行】按钮' },
{ deviceType: '04', orderNum: 3, operateCode: '3012', tip: '鼠标左键点击【执行】按钮' },
{ deviceType: '04', orderNum: 4, operateCode: '301', tip: '输入密码123点击【确定】按钮' }
]
},
@ -101,7 +101,7 @@ export default {
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '2994', tip: '鼠标左键点击【总取消】' },
{ deviceType: '04', orderNum: 2, operateCode: '0011', tip: '输入密码123点击【确定】按钮' },
{ deviceType: '04', orderNum: 3, operateCode: '2994', tip: '鼠标左键点击【{5}】按钮', codeType:'SIGNAL' }
{ deviceType: '04', orderNum: 3, operateCode: '2994', tip: '鼠标左键点击【{5}】', codeType:'SIGNAL' }
]
},
{ // 不生成实训
@ -173,8 +173,7 @@ export default {
productTypes: ['02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '306', tip: '鼠标右键菜单选择【信号封锁】' },
{ deviceType: '04', orderNum: 2, operateCode: '306', tip: '鼠标左键点击【确定】按钮' },
{ deviceType: '04', orderNum: 3, operateCode: '306', tip: '输入密码123点击【确定】按钮' }
{ deviceType: '04', orderNum: 2, operateCode: '306', tip: '鼠标左键点击【确定】按钮' }
]
},
{
@ -187,7 +186,7 @@ export default {
trainingType: 'Signal',
productTypes: ['01'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '2991', tip: '鼠标左键菜单选择【封锁】' },
{ deviceType: '04', orderNum: 1, operateCode: '2991', tip: '鼠标左键点击【封锁】' },
{ deviceType: '04', orderNum: 1, operateCode: '2991', tip: '鼠标左键点击【{5}】', codeType:'SIGNAL' }
]
},
@ -202,8 +201,8 @@ export default {
productTypes: ['02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '307', tip: '鼠标右键菜单选择【信号解封】' },
{ deviceType: '04', orderNum: 2, operateCode: '307', tip: '鼠标左键点击【确认】按钮' },
{ deviceType: '04', orderNum: 3, operateCode: '307', tip: '输入密码123点击【确】按钮' }
{ deviceType: '04', orderNum: 2, operateCode: '3072', tip: '鼠标左键点击【确认】按钮' },
{ deviceType: '04', orderNum: 3, operateCode: '307', tip: '输入密码123点击【确】按钮' }
]
},
{
@ -216,8 +215,8 @@ export default {
trainingType: 'Signal',
productTypes: ['01'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '2992', tip: '鼠标左键菜单选择【解封】' },
{ deviceType: '04', orderNum: 2, operateCode: '0011', tip: '输入密码123点击【确】按钮' },
{ deviceType: '04', orderNum: 1, operateCode: '2992', tip: '鼠标左键点击【解封】' },
{ deviceType: '04', orderNum: 2, operateCode: '0011', tip: '输入密码123点击【确】按钮' },
{ deviceType: '04', orderNum: 3, operateCode: '2992', tip: '鼠标左键点击【{5}】', codeType:'SIGNAL' }
]
},
@ -318,7 +317,7 @@ export default {
trainingType: 'Switch',
productTypes: ['01'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '1010', tip: '鼠标左键菜单选择【道岔定操】' },
{ deviceType: '02', orderNum: 1, operateCode: '1010', tip: '鼠标左键点击【道岔定操】' },
{ deviceType: '02', orderNum: 2, operateCode: '1010', tip: '鼠标左键点击【{7}】', codeType:'SWITCH' }
]
},
@ -346,8 +345,8 @@ export default {
trainingType: 'Switch',
productTypes: ['01'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '1020', tip: '鼠标左键菜单选择【道岔反操】' },
{ deviceType: '02', orderNum: 2, operateCode: '1020', tip: '鼠标左键点击【{7}】按钮', codeType:'SWITCH' }
{ deviceType: '02', orderNum: 1, operateCode: '1020', tip: '鼠标左键点击【道岔反操】' },
{ deviceType: '02', orderNum: 2, operateCode: '1020', tip: '鼠标左键点击【{7}】', codeType:'SWITCH' }
]
},
{
@ -374,8 +373,8 @@ export default {
trainingType: 'Switch',
productTypes: ['01'], // 现地操作
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '1030', tip: '鼠标左键菜单选择【道岔单锁】' },
{ deviceType: '02', orderNum: 2, operateCode: '1030', tip: '鼠标左键点击【{{7}}】', codeType:'SWITCH' }
{ deviceType: '02', orderNum: 1, operateCode: '1030', tip: '鼠标左键点击【道岔单锁】' },
{ deviceType: '02', orderNum: 2, operateCode: '1030', tip: '鼠标左键点击【{7}】', codeType:'SWITCH' }
]
},
{
@ -402,9 +401,9 @@ export default {
trainingType: 'Switch',
productTypes: ['01'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '1040', tip: '鼠标左键菜单选择【道岔解锁】' },
{ deviceType: '02', orderNum: 2, operateCode: '0011', tip: '输入密码123点击【确】按钮' },
{ deviceType: '02', orderNum: 3, operateCode: '1040', tip: '鼠标左键点击【{7}】按钮', codeType:'SWITCH' }
{ deviceType: '02', orderNum: 1, operateCode: '1040', tip: '鼠标左键点击【道岔解锁】' },
{ deviceType: '02', orderNum: 2, operateCode: '0011', tip: '输入密码123点击【确】按钮' },
{ deviceType: '02', orderNum: 3, operateCode: '1040', tip: '鼠标左键点击【{7}】', codeType:'SWITCH' }
]
},
{
@ -418,7 +417,7 @@ export default {
productTypes: ['02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '105', tip: '鼠标右键菜单选择【道岔封锁】' },
{ deviceType: '02', orderNum: 2, operateCode: '105', tip: '鼠标左键点击【确定】按钮' },
{ deviceType: '02', orderNum: 2, operateCode: '1051', tip: '鼠标左键点击【确定】按钮' },
{ deviceType: '02', orderNum: 3, operateCode: '105', tip: '输入密码123点击【确定】按钮' }
]
},
@ -432,8 +431,8 @@ export default {
trainingType: 'Switch',
productTypes: ['01'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '2991', tip: '鼠标左键菜单选择【封锁】' },
{ deviceType: '02', orderNum: 2, operateCode: '2991', tip: '鼠标左键点击【{7}】按钮', codeType:'SWITCH' }
{ deviceType: '02', orderNum: 1, operateCode: '2991', tip: '鼠标左键点击【封锁】' },
{ deviceType: '02', orderNum: 2, operateCode: '2991', tip: '鼠标左键点击【{7}】', codeType:'SWITCH' }
]
},
{
@ -447,8 +446,8 @@ export default {
productTypes: ['02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '106', tip: '鼠标右键菜单选择【道岔解封】' },
{ deviceType: '02', orderNum: 2, operateCode: '106', tip: '鼠标左键点击【确】按钮' },
{ deviceType: '02', orderNum: 3, operateCode: '106', tip: '输入密码123点击【确】按钮' }
{ deviceType: '02', orderNum: 2, operateCode: '1062', tip: '鼠标左键点击【确】按钮' },
{ deviceType: '02', orderNum: 3, operateCode: '106', tip: '输入密码123点击【确】按钮' }
]
},
{
@ -461,9 +460,9 @@ export default {
trainingType: 'Switch',
productTypes: ['01'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '2992', tip: '鼠标左键菜单选择【解封】' },
{ deviceType: '02', orderNum: 2, operateCode: '0011', tip: '输入密码123点击【确】按钮' },
{ deviceType: '02', orderNum: 3, operateCode: '2992', tip: '鼠标左键点击【{7}】按钮', codeType:'SWITCH' }
{ deviceType: '02', orderNum: 1, operateCode: '2992', tip: '鼠标左键点击【解封】' },
{ deviceType: '02', orderNum: 2, operateCode: '0011', tip: '输入密码123点击【确】按钮' },
{ deviceType: '02', orderNum: 3, operateCode: '2992', tip: '鼠标左键点击【{7}】', codeType:'SWITCH' }
]
},
{
@ -477,8 +476,8 @@ export default {
productTypes: ['02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '109', tip: '鼠标右键菜单选择【区故解】' },
{ deviceType: '02', orderNum: 2, operateCode: '109', tip: '鼠标左键点击【确】按钮' },
{ deviceType: '02', orderNum: 3, operateCode: '109', tip: '输入密码123点击【确】按钮' }
{ deviceType: '02', orderNum: 2, operateCode: '1092', tip: '鼠标左键点击【确】按钮' },
{ deviceType: '02', orderNum: 3, operateCode: '109', tip: '输入密码123点击【确】按钮' }
]
},
// 区段列表
@ -493,8 +492,8 @@ export default {
productTypes: ['02'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '402', tip: '鼠标右键菜单选择【区故解】' },
{ deviceType: '03', orderNum: 2, operateCode: '402', tip: '鼠标左键点击【确】按钮' },
{ deviceType: '03', orderNum: 3, operateCode: '402', tip: '输入密码123点击【确】按钮' }
{ deviceType: '03', orderNum: 2, operateCode: '4023', tip: '鼠标左键点击【确】按钮' },
{ deviceType: '03', orderNum: 3, operateCode: '402', tip: '输入密码123点击【确】按钮' }
]
},
{
@ -502,14 +501,14 @@ export default {
minDuration: 8,
operateType: CMD.Section.CMD_SECTION_FAULT_UNLOCK.value,
skinCode: '04',
trainingName: '区故解({9})',
trainingName: '区故解({8}{9})',
trainingRemark: '故障解锁功能',
trainingType: 'Section',
productTypes: ['01'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '4020', tip: '鼠标右键菜单选择【区故解】' },
{ deviceType: '03', orderNum: 2, operateCode: '0011', tip: '输入密码123点击【确】按钮' },
{ deviceType: '03', orderNum: 3, operateCode: '4020', tip: '鼠标左键点击【{9}】', codeType:'SECTION' }
{ deviceType: '03', orderNum: 1, operateCode: '4020', tip: '鼠标左键点击【区故解】'},
{ deviceType: '03', orderNum: 2, operateCode: '0011', tip: '输入密码123点击【确】按钮' },
{ deviceType: '03', orderNum: 3, operateCode: '4020', tip: '鼠标左键点击【{8}{9}】', codeType:'SECTION' }
]
},
{
@ -523,7 +522,7 @@ export default {
productTypes: ['02'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '410', tip: '鼠标右键菜单选择【属性】' },
{ deviceType: '03', orderNum: 2, operateCode: '410', tip: '鼠标左键点击【确】按钮' }
{ deviceType: '03', orderNum: 2, operateCode: '410', tip: '鼠标左键点击【确】按钮' }
]
},
// 站台列表

View File

@ -83,6 +83,9 @@ export default {
return this.dialogShow ? OperationEvent.Command.close.menu.domId : '';
},
domIdConfirm() {
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
return OperationEvent.Signal.unlock.confirm.domId;
}
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
},
title() {
@ -262,21 +265,22 @@ export default {
},
//
lock() {
switch (this.popClass) {
case 'chengdou-03__systerm':
this.sendCommandNext(menuOperate.Signal.lock).then(operate => {
this.$refs.password.doShow(operate);
});
break;
default: this.sendCommand(menuOperate.Signal.lock);
}
// switch (this.popClass) {
// case 'chengdou-03__systerm':
// this.sendCommandNext(menuOperate.Signal.lock).then(operate => {
// this.$refs.password.doShow(operate);
// });
// break;
// default: this.sendCommand(menuOperate.Signal.lock);
// }
this.sendCommand(menuOperate.Signal.lock);
},
//
unlock() {
switch (this.popClass) {
case 'chengdou-03__systerm':
this.sendCommandNext(menuOperate.Signal.unlock).then(operate => {
this.$refs.password.doShow(operate);
this.sendCommandNext({operation:OperationEvent.Signal.unlock.confirm.operation}).then(operate => {
this.$refs.password.doShow({operation:OperationEvent.Signal.unlock.menu.operation});
});
break;
default: this.sendCommand(menuOperate.Signal.unlock);

View File

@ -85,6 +85,9 @@ export default {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
if (this.operation == OperationEvent.Section.fault.menu.operation) {
return OperationEvent.Section.fault.confirm.domId;
}
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
},
title() {
@ -187,7 +190,7 @@ export default {
//
fault() {
const operate = {
operation: OperationEvent.Section.fault.menu.operation
operation: OperationEvent.Section.fault.confirm.operation
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
@ -195,7 +198,7 @@ export default {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.doClose();
this.$refs.passwordBox.doShow(operate);
this.$refs.passwordBox.doShow({operation: OperationEvent.Section.fault.menu.operation});
}
}).catch(() => {
this.loading = false;

View File

@ -110,6 +110,13 @@ export default {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
if (this.operation == OperationEvent.Switch.fault.menu.operation) {
return OperationEvent.Switch.fault.confirm.domId;
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
return OperationEvent.Switch.unblock.confirm.domId;
} else if (this.operation == OperationEvent.Switch.block.menu.operation) {
return OperationEvent.Switch.block.confirm.domId;
}
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
},
title() {
@ -226,11 +233,10 @@ export default {
block() {
switch (this.popClass) {
case 'chengdou-03__systerm':
this.openPasswordBox(this.operation);
this.openPasswordBox(OperationEvent.Switch.block);
break;
default: this.sendCommand(menuOperate.Switch.block);
}
},
//
locate() {
@ -260,7 +266,7 @@ export default {
unblock() {
switch (this.popClass) {
case 'chengdou-03__systerm':
this.openPasswordBox(this.operation);
this.openPasswordBox(OperationEvent.Switch.unblock);
break;
default: this.sendCommand(menuOperate.Switch.unblock);
}
@ -269,7 +275,7 @@ export default {
fault() {
switch (this.popClass) {
case 'chengdou-03__systerm':
this.openPasswordBox(this.operation);
this.openPasswordBox(OperationEvent.Switch.fault);
break;
default: this.sendCommand(menuOperate.Switch.fault);
}
@ -280,9 +286,9 @@ export default {
},
//
openPasswordBox(operation) {
openPasswordBox(operator) {
const operate = {
operation: operation
operation: operator.confirm.operation
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
@ -290,7 +296,7 @@ export default {
if (valid) {
this.doClose();
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.passwordBox.doShow(operate);
this.$refs.passwordBox.doShow({operation:operator.menu.operation});
}
}).catch(() => {
this.doClose();

View File

@ -5,7 +5,7 @@ export default {
EdgeHeight: 180,
/** 间隔高度*/
CoordMultiple: 900,
CoordMultiple: 2000,
/** 偏移时间*/
TranslationTime: 60 * 60 * 2,

View File

@ -19,14 +19,14 @@
<el-button size="mini" style="float: right;" @click="cancel">撤销</el-button>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="8" class="button-bottom-left">
<div class="button-group" style="overflow: hidden;">
<div class="button-bottom-left">
<el-button :id="domIdConfirm" size="mini" style="float: left;" :loading="loading" @click="commit">发送请求</el-button>
</el-col>
<el-col :span="8" :offset="8" class="button-bottom-right">
</div>
<div class="button-bottom-right">
<el-button :id="domIdCancel" size="mini" style="float: right;" @click="cancel">取消请求</el-button>
</el-col>
</el-row>
</div>
</div>
<notice-info ref="noticeInfo" pop-class="xian-02__system" />
</div>
</div>
@ -132,7 +132,7 @@ export default {
this.$store.dispatch('training/updateMapState', [deviceStatus]);
} else {
operate = {
send: true,
over: true,
operation: eachCmd.operation.code,
cmdType: eachCmd.cmdType,
param: eachCmd.param //
@ -168,10 +168,8 @@ export default {
height: auto;
position: absolute;
bottom: 10px;
left: 50%;
background: #fff;
left: calc(50% - 300px);
z-index: 10;
transform: translateX(-300px);
background: #518E86;
.title-box{
@ -233,6 +231,8 @@ export default {
}
}
.button-bottom-left{
overflow: hidden;
float: left;
.el-button{
width: 60px;
padding: 0;
@ -247,6 +247,8 @@ export default {
}
}
.button-bottom-right{
overflow: hidden;
float: right;
.el-button{
width: 60px;
padding: 0;

View File

@ -336,7 +336,7 @@ export default {
this.resetRouteSignal();
this.$store.dispatch('menuOperation/pushRequestList', {
device: this.routeData[routeCode],
operation: { code: OperationEvent.Signal.arrangementRoute.menu.operation, name: '排列进路'},
operation: { code: OperationEvent.Command.commandXian.confirm.operation, name: '排列进路'},
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE,
param: step.param
});
@ -363,7 +363,7 @@ export default {
this.resetRouteSignal();
this.$store.dispatch('menuOperation/pushRequestList', {
device: this.selected,
operation: { code: OperationEvent.Signal.arrangementRoute.menu.operation, name: '取消进路'},
operation: { code: OperationEvent.Command.commandXian.confirm.operation, name: '取消进路'},
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE,
param: step.param
});
@ -388,7 +388,7 @@ export default {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$store.dispatch('menuOperation/pushRequestList', {
device: this.selected,
operation: { code: OperationEvent.Signal.lock.menu.operation, name: '终端信号封锁'},
operation: { code: OperationEvent.Command.commandXian.confirm.operation, name: '终端信号封锁'},
param: {signalCode: this.selected.code},
cmdType: CMD.Signal.CMD_SIGNAL_BLOCK
});
@ -414,7 +414,7 @@ export default {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$store.dispatch('menuOperation/pushRequestList', {
device: this.selected,
operation: { code: OperationEvent.Signal.lock.menu.operation, name: '终端信号解封'},
operation: { code: OperationEvent.Command.commandXian.confirm.operation, name: '终端信号解封'},
ciConfirm: true,
param: {signalCode: this.selected.code}
});
@ -440,7 +440,7 @@ export default {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$store.dispatch('menuOperation/pushRequestList', {
device: this.selected,
operation: { code: OperationEvent.Signal.guide.menu.operation, name: '引导信号'},
operation: { code: OperationEvent.Command.commandXian.confirm.operation, name: '引导信号'},
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE,
param: step.param
});
@ -471,7 +471,7 @@ export default {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$store.dispatch('menuOperation/pushRequestList', {
device: this.selected,
operation: { code: OperationEvent.Signal.humanControl.menu.operation, name: '关闭自动进路'},
operation: { code: OperationEvent.Command.commandXian.confirm.operation, name: '关闭自动进路'},
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING,
param: step.param
});
@ -503,7 +503,7 @@ export default {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$store.dispatch('menuOperation/pushRequestList', {
device: this.selected,
operation: { code: OperationEvent.Signal.atsAutoControl.menu.operation, name: '开放自动进路'},
operation: { code: OperationEvent.Command.commandXian.confirm.operation, name: '开放自动进路'},
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING,
param: step.param
});
@ -539,7 +539,7 @@ export default {
enabledConfirm() {
this.$store.dispatch('menuOperation/pushRequestList', {
device: this.selected,
operation: { code: OperationEvent.Signal.unlock.menu.operation, name: '终端信号解封'},
operation: { code: OperationEvent.Command.commandXian.confirm.operation, name: '终端信号解封'},
cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK,
param: {
signal: this.selected.code

View File

@ -253,7 +253,7 @@ export default {
if (valid) {
this.$store.dispatch('menuOperation/pushRequestList', {
device: this.selected,
operation: { code: OperationEvent.Switch.locate.menu.operation, name: '道岔定位'},
operation: { code: OperationEvent.Command.commandXian.confirm.operation, name: '道岔定位'},
cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION,
param: operate.param
});
@ -266,7 +266,7 @@ export default {
if (valid) {
this.$store.dispatch('menuOperation/pushRequestList', {
device: this.selected,
operation: { code: OperationEvent.Switch.reverse.menu.operation, name: '道岔反位'},
operation: { code: OperationEvent.Command.commandXian.confirm.operation, name: '道岔反位'},
cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION,
param: operate.param
});
@ -280,20 +280,20 @@ export default {
if (valid) {
this.$store.dispatch('menuOperation/pushRequestList', {
device: this.selected,
operation: { code: OperationEvent.Switch.lock.menu.operation, name: '道岔单锁'},
operation: { code: OperationEvent.Command.commandXian.confirm.operation, name: '道岔单锁'},
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK,
param: operate.param
});
}
});
},
//
//
unlock() {
commitOperate(menuOperate.Switch.unlock, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
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,
ciConfirm: true,
param: operate.param
@ -317,14 +317,14 @@ export default {
// }
// });
// },
//
setSpeed() {
commitOperate(menuOperate.Switch.setSpeed, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.speedLimitControl.doShow(operate, this.selected);
}
});
},
// //
// setSpeed() {
// commitOperate(menuOperate.Switch.setSpeed, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
// if (valid) {
// this.$refs.speedLimitControl.doShow(operate, this.selected);
// }
// });
// },
enabledConfirm() {
this.$store.dispatch('menuOperation/pushRequestList', {
device: this.selected,

View File

@ -4,63 +4,35 @@ export default {
maxDuration: 8,
minDuration: 5,
operateType: 'Stand_Set_Hold_Train',
skinCode: '06',
skinCode: '09',
trainingName: '扣车({10}-{12} 站台)',
trainingRemark: '设置扣车功能',
trainingType: 'Stand',
productTypes: ['01', '02'], // 产品类型 01 现地 02 行调
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '504', tip: '鼠标右键菜单选择【扣车】' },
{ deviceType: '06', orderNum: 2, operateCode: '504', tip: '鼠标左键点击【确定】按钮' }
{ deviceType: '06', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【发送请求】按钮' }
]
},
{
maxDuration: 8,
minDuration: 5,
operateType: 'Stand_Cancel_Hold_Train',
skinCode: '06',
skinCode: '09',
trainingName: '取消扣车({10}-{12} 站台)',
trainingRemark: '取消扣车功能',
trainingType: 'Stand',
productTypes: ['01', '02'], // 产品类型 01 现地 02 行调
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '505', tip: '鼠标右键菜单选择【取消扣车】' },
{ deviceType: '06', orderNum: 2, operateCode: '505', tip: '鼠标左键点击【确定】按钮' }
{ deviceType: '06', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【发送请求】按钮' }
]
},
// {
// maxDuration: 8,
// minDuration: 5,
// operateType: 'Stand_Set_Hold_Train_Batch',
// skinCode: '06',
// trainingName: '批量扣车({10}-{12} 站台)',
// trainingRemark: '批量扣车功能',
// trainingType: 'Stand',
// productTypes: ['02'], // 产品类型 01 现地 02 行调
// stepVOList: [
// { deviceType: '06', orderNum: 1, operateCode: '515', tip: '鼠标右键菜单选择【批量扣车】' },
// { deviceType: '06', orderNum: 2, operateCode: '515', tip: '鼠标左键点击【确定】按钮' }
// ]
// },
// {
// maxDuration: 8,
// minDuration: 5,
// operateType: 'Stand_Cancel_Hold_Train_Batch',
// skinCode: '06',
// trainingName: '取消批量扣车({10}-{12} 站台)',
// trainingRemark: '取消批量扣车功能',
// trainingType: 'Stand',
// productTypes: ['02'], // 产品类型 01 现地 02 行调
// stepVOList: [
// { deviceType: '06', orderNum: 1, operateCode: '516', tip: '鼠标右键菜单选择【取消批量扣车】' },
// { deviceType: '06', orderNum: 2, operateCode: '516', tip: '鼠标左键点击【确定】按钮' }
// ]
// },
// {
// maxDuration: 15,
// minDuration: 8,
// operateType: 'Stand_Early_Depart',
// skinCode: '06',
// skinCode: '09',
// trainingName: '提前发车({10}-{12}站台)',
// trainingRemark: '提前发车功能',
// trainingType: 'Stand',
@ -74,35 +46,35 @@ export default {
maxDuration: 15,
minDuration: 8,
operateType: 'Stand_Set_Jump_Stop',
skinCode: '06',
skinCode: '09',
trainingName: '设置跳停({10}-{12}站台)',
trainingRemark: '设置跳停功能',
trainingType: 'Stand',
productTypes: ['02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '502', tip: '鼠标右键菜单选择【设置跳停】' },
{ deviceType: '06', orderNum: 2, operateCode: '502', tip: '鼠标左键点击【确定】按钮' }
{ deviceType: '06', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【发送请求】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: 'Stand_Cancel_Jump_Stop',
skinCode: '06',
skinCode: '09',
trainingName: '取消跳停({10}-{12}站台)',
trainingRemark: '设置取消跳停功能',
trainingType: 'Stand',
productTypes: ['02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '503', tip: '鼠标右键菜单选择【取消跳停】' },
{ deviceType: '06', orderNum: 2, operateCode: '503', tip: '鼠标左键点击【确定】按钮' }
{ deviceType: '06', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【发送请求】按钮' }
]
},
// {
// maxDuration: 15,
// minDuration: 8,
// operateType: 'Stand_Set_Park_Time',
// skinCode: '06',
// skinCode: '09',
// trainingName: '设置停站时间({10}-{12}站台)',
// trainingRemark: '设置停站时间(自动, 一直有效)',
// trainingType: 'Stand',
@ -117,7 +89,7 @@ export default {
// maxDuration: 15,
// minDuration: 8,
// operateType: 'Stand_Set_Park_Time',
// skinCode: '06',
// skinCode: '09',
// trainingName: '设置停站时间({10}-{12}站台)',
// trainingRemark: '设置停站时间(人工, 20秒, 一直有效)',
// trainingType: 'Stand',
@ -133,7 +105,7 @@ export default {
// maxDuration: 15,
// minDuration: 8,
// operateType: 'Stand_Set_Park_Time',
// skinCode: '06',
// skinCode: '09',
// trainingName: '设置停站时间({10}-{12}站台)',
// trainingRemark: '设置停站时间(人工, 20秒, 一次有效)',
// trainingType: 'Stand',
@ -146,72 +118,11 @@ export default {
// { deviceType: '06', orderNum: 5, operateCode: '509', tip: '鼠标左键点击【确认】按钮' }
// ]
// },
// {
// maxDuration: 15,
// minDuration: 8,
// operateType: 'Stand_Set_Run_Time',
// skinCode: '06',
// trainingName: '设置运行等级({10}-{12} 站台)',
// trainingRemark: '设置运行等级(设置区间 运行等级1运行时间为115一直有效)',
// trainingType: 'Stand',
// productTypes: ['02'],
// stepVOList: [
// { 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: '5103', tip: '鼠标左键点击,选择【一直有效】', val: 'true' },
// { deviceType: '06', orderNum: 5, operateCode: '510', tip: '鼠标左键点击【确认】按钮' }
// ]
// },
// {
// maxDuration: 15,
// minDuration: 8,
// operateType: 'Stand_Set_Run_Time',
// skinCode: '06',
// trainingName: '设置运行等级({10}-{12} 站台)',
// trainingRemark: '设置运行等级(设置区间 运行等级自动,一直有效)',
// trainingType: 'Stand',
// productTypes: ['02'],
// stepVOList: [
// { deviceType: '06', orderNum: 1, operateCode: '510', tip: '鼠标右键菜单选择【设置运行等级】' },
// { deviceType: '06', orderNum: 2, operateCode: '5104', tip: '鼠标左键点击,选择【自动】', val: '0' },
// { deviceType: '06', orderNum: 3, operateCode: '5103', tip: '鼠标左键点击,选择【一直有效】', val: 'true' },
// { deviceType: '06', orderNum: 4, operateCode: '510', tip: '鼠标左键点击【确认】按钮' }
// ]
// },
// {
// maxDuration: 15,
// minDuration: 8,
// operateType: 'Stand_Set_Hold_Train_Auto',
// skinCode: '06',
// trainingName: '区间列车数量限制({10}-{12}站台)',
// trainingRemark: '区间列车数量限制',
// trainingType: 'Stand',
// productTypes: ['02'],
// stepVOList: [
// { deviceType: '06', orderNum: 1, operateCode: '517', tip: '鼠标右键菜单选择【区间列车数量限制】' },
// { deviceType: '06', orderNum: 2, operateCode: '517', tip: '鼠标左键点击【确认】按钮' }
// ]
// },
// {
// maxDuration: 15,
// minDuration: 8,
// operateType: 'Stand_Cancel_Hold_Train_Auto',
// skinCode: '06',
// trainingName: '取消区间列车数量限制({10}-{12}站台)',
// trainingRemark: '取消区间列车数量限制',
// trainingType: 'Stand',
// productTypes: ['02'],
// stepVOList: [
// { deviceType: '06', orderNum: 1, operateCode: '518', tip: '鼠标右键菜单选择【取消区间列车数量限制】' },
// { deviceType: '06', orderNum: 2, operateCode: '518', tip: '鼠标左键点击【确认】按钮' }
// ]
// },
{
maxDuration: 8,
minDuration: 5,
operateType: 'Stand_View_Status',
skinCode: '06',
skinCode: '09',
trainingName: '站台详细信息({10}-{12}站台)',
trainingRemark: '站台详细信息功能',
trainingType: 'Stand',
@ -226,7 +137,7 @@ export default {
maxDuration: 15,
minDuration: 8,
operateType: 'Section_Fault_Unlock',
skinCode: '06',
skinCode: '09',
trainingName: '区段故障解锁({8}{9})',
trainingRemark: '区段故障解锁',
trainingType: 'Section',
@ -243,35 +154,35 @@ export default {
maxDuration: 15,
minDuration: 8,
operateType: 'Section_Cut_Off',
skinCode: '06',
skinCode: '09',
trainingName: '区段跟踪切除({8}{9})',
trainingRemark: '区段跟踪切除',
trainingType: 'Section',
productTypes: ['01', '02'],
productTypes: ['01'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '405', tip: '鼠标右键菜单选择【区段跟踪切除】' },
{ deviceType: '03', orderNum: 2, operateCode: '405', tip: '鼠标左键点击【确定】按钮' }
{ deviceType: '03', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【发送请求】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: 'Section_Active',
skinCode: '06',
skinCode: '09',
trainingName: '区段跟踪激活({8}{9})',
trainingRemark: '区段跟踪激活功能',
trainingType: 'Section',
productTypes: ['01', '02'],
productTypes: ['01'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '406', tip: '鼠标右键菜单选择【区段跟踪激活】' },
{ deviceType: '03', orderNum: 2, operateCode: '406', tip: '鼠标左键点击【确定】按钮' }
{ deviceType: '03', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【发送请求】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: 'Section_Set_Limit_Speed',
skinCode: '06',
skinCode: '09',
trainingName: '设置临时限速({8}{9})',
trainingRemark: '设置临时限速功能限速值5',
trainingType: 'Section',
@ -290,7 +201,7 @@ export default {
maxDuration: 15,
minDuration: 8,
operateType: 'Section_Set_Limit_Speed',
skinCode: '06',
skinCode: '09',
trainingName: '设置临时限速({8}{9})',
trainingRemark: '设置临时限速功能-取消临时限速(限速值:不限速)',
trainingType: 'Section',
@ -309,49 +220,29 @@ export default {
maxDuration: 15,
minDuration: 8,
operateType: 'Section_Block',
skinCode: '06',
skinCode: '09',
trainingName: '区段封锁({8}{9})',
trainingRemark: '区段封锁功能',
trainingType: 'Section',
productTypes: ['01'],
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '403', tip: '鼠标右键菜单选择【区段封锁】' },
{ deviceType: '03', orderNum: 2, operateCode: '403', tip: '鼠标左键点击【确定】按钮' }
{ deviceType: '03', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【发送请求】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: 'Section_Unblock',
skinCode: '06',
skinCode: '09',
trainingName: '区段解封({8}{9})',
trainingRemark: '区段解封功能',
trainingType: 'Section',
productTypes: ['01'],
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '404', tip: '鼠标右键菜单选择【区段解封】' },
{ deviceType: '03', orderNum: 2, operateCode: '4043', tip: '鼠标左键点击【确定】按钮' },
{ deviceType: '03', orderNum: 3, operateCode: '4046', tip: '鼠标左键选择({8}{9})区段', val: '{19}' },
{ deviceType: '03', orderNum: 4, operateCode: '4044', tip: '鼠标左键点击【确定】按钮' },
{ deviceType: '03', orderNum: 5, operateCode: '4042', tip: '鼠标左键点击【关闭】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: 'Section_Confirm_Axis_Valid',
skinCode: '06',
trainingName: '确认计轴有效({8}{9})',
trainingRemark: '确认计轴有效功能',
trainingType: 'Section',
productTypes: ['02'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '412', tip: '鼠标右键菜单选择【确认计轴有效】' },
{ deviceType: '03', orderNum: 2, operateCode: '4123', tip: '鼠标左键选择【确认】' },
{ deviceType: '03', orderNum: 3, operateCode: '4121', tip: '鼠标左键选择{20}', val: '{22}' },
{ deviceType: '03', orderNum: 4, operateCode: '4122', tip: '鼠标左键选择({8}{9})', val: '{19}' },
{ deviceType: '03', orderNum: 5, operateCode: '4124', tip: '鼠标左键点击【确认】按钮' },
{ deviceType: '03', orderNum: 6, operateCode: '000', tip: '鼠标左键点击【关闭】按钮' }
{ deviceType: '03', orderNum: 2, operateCode: '4042', tip: '鼠标左键点击【是】按钮' },
{ deviceType: '03', orderNum: 3, operateCode: '009', tip: '鼠标左键点击【发送请求】按钮' }
]
},
@ -359,174 +250,58 @@ export default {
maxDuration: 15,
minDuration: 8,
operateType: 'Switch_Normal_Position',
skinCode: '06',
skinCode: '09',
trainingName: '定操({7})',
trainingRemark: '定操({7})',
trainingType: 'Switch',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '101', tip: '鼠标左键菜单选择【定操】' },
{ deviceType: '02', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【确定】按钮' }
{ deviceType: '02', orderNum: 1, operateCode: '101', tip: '鼠标左键菜单选择【道岔定位】' },
{ deviceType: '02', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【发送请求】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: 'Switch_Reverse_Position', // 0313 新增定位字典
skinCode: '06',
operateType: 'Switch_Reverse_Position',
skinCode: '09',
trainingName: '反操({7})',
trainingRemark: '反操({7})',
trainingType: 'Switch',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '102', tip: '鼠标右键菜单选择【反操】' },
{ deviceType: '02', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: 'Switch_Cut_Off',
skinCode: '06',
trainingName: '区段切除({7})',
trainingRemark: '区段切除',
trainingType: 'Switch',
productTypes: ['02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '111', tip: '鼠标右键菜单选择【区段切除】' },
{ deviceType: '02', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: 'Switch_Active',
skinCode: '06',
trainingName: '区段激活({7})',
trainingRemark: '区段激活功能',
trainingType: 'Switch',
productTypes: ['02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '112', tip: '鼠标右键菜单选择【区段激活】' },
{ deviceType: '02', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: 'Switch_Confirm_Axis_Valid',
skinCode: '06',
trainingName: '确认计轴有效({8}{9})',
trainingRemark: '确认计轴有效功能',
trainingType: 'Switch',
productTypes: ['02'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '412', tip: '鼠标右键菜单选择【确认计轴有效】' },
{ deviceType: '03', orderNum: 2, operateCode: '4123', tip: '鼠标左键选择【确认】' },
{ deviceType: '03', orderNum: 3, operateCode: '4121', tip: '鼠标左键选择{21}', val: '{23}' },
{ deviceType: '03', orderNum: 4, operateCode: '4122', tip: '鼠标左键选择({25})', val: '{24}' },
{ deviceType: '03', orderNum: 5, operateCode: '4124', tip: '鼠标左键点击【确认】按钮' },
{ deviceType: '03', orderNum: 6, operateCode: '000', tip: '鼠标左键点击【关闭】按钮' }
{ deviceType: '02', orderNum: 1, operateCode: '102', tip: '鼠标右键菜单选择【道岔反位】' },
{ deviceType: '02', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【发送请求】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: 'Switch_Single_Lock',
skinCode: '06',
skinCode: '09',
trainingName: '道岔单锁({7})',
trainingRemark: '道岔单锁功能',
trainingType: 'Switch',
productTypes: ['01'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '103', tip: '鼠标右键菜单选择【道岔单锁】' },
{ deviceType: '02', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【确定】按钮' }
{ deviceType: '02', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【发送请求】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: 'Switch_Single_Unlock',
skinCode: '06',
skinCode: '09',
trainingName: '道岔单解({7})',
trainingRemark: '道岔单解功能',
trainingType: 'Switch',
productTypes: ['01'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '104', tip: '鼠标右键菜单选择【道岔单解】' },
{ deviceType: '03', orderNum: 2, operateCode: '1043', tip: '鼠标左键点击【确定】按钮' },
{ deviceType: '03', orderNum: 3, operateCode: '1046', tip: '鼠标左键选择({7})区段', val: '{17}' },
{ deviceType: '03', orderNum: 4, operateCode: '1044', tip: '鼠标左键点击【确定】按钮' },
{ deviceType: '03', orderNum: 5, operateCode: '1042', tip: '鼠标左键点击【关闭】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: 'Switch_Block',
skinCode: '06',
trainingName: '道岔封锁({7})',
trainingRemark: '道岔封锁功能',
trainingType: 'Switch',
productTypes: ['01'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '105', tip: '鼠标右键菜单选择【道岔封锁】' },
{ deviceType: '02', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: 'Switch_Unblock',
skinCode: '06',
trainingName: '道岔解封({7})',
trainingRemark: '道岔解封功能',
trainingType: 'Switch',
productTypes: ['01'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '106', tip: '鼠标右键菜单选择【道岔解封】' },
{ deviceType: '03', orderNum: 2, operateCode: '1063', tip: '鼠标左键点击【确定】按钮' },
{ deviceType: '03', orderNum: 3, operateCode: '1066', tip: '鼠标左键选择({7})区段', val: '{17}' },
{ deviceType: '03', orderNum: 4, operateCode: '1064', tip: '鼠标左键点击【确定】按钮' },
{ deviceType: '03', orderNum: 5, operateCode: '1062', tip: '鼠标左键点击【关闭】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: 'Switch_Set_Limit_Speed',
skinCode: '06',
trainingName: '设置临时限速({7})',
trainingRemark: '设置临时限速功能限速值10',
trainingType: 'Switch',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '113', tip: '鼠标右键菜单选择【设置临时限速】' },
{ deviceType: '02', orderNum: 2, operateCode: '1136', tip: '鼠标左键选择【限速值5】', val: '10' },
{ 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: '10' },
{ deviceType: '02', orderNum: 7, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: 'Switch_Set_Limit_Speed',
skinCode: '06',
trainingName: '设置临时限速({7})',
trainingRemark: '设置临时限速功能-取消临时限速(限速值:不限速)',
trainingType: 'Switch',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '113', tip: '鼠标右键菜单选择【设置临时限速】' },
{ deviceType: '02', orderNum: 2, operateCode: '1136', tip: '鼠标左键选择【限速值: 不限】', val: '0' },
{ 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: '0' },
{ deviceType: '02', orderNum: 7, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' }
{ deviceType: '02', orderNum: 1, operateCode: '104', tip: '鼠标右键菜单选择【道岔单解】' },
{ deviceType: '02', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【发送请求】按钮' },
{ deviceType: '02', orderNum: 3, operateCode: '104', tip: '鼠标右键点击【E】选择使能' },
{ deviceType: '02', orderNum: 4, operateCode: '009', tip: '鼠标左键点击【发送请求】按钮' }
]
},
@ -534,7 +309,7 @@ export default {
maxDuration: 15,
minDuration: 8,
operateType: 'Signal_Set_Route',
skinCode: '06',
skinCode: '09',
trainingName: '排列进路({3})',
trainingRemark: '排列进路',
trainingType: 'Signal',
@ -549,7 +324,7 @@ export default {
maxDuration: 15,
minDuration: 8,
operateType: 'Signal_Cancel_Route',
skinCode: '06',
skinCode: '09',
trainingName: '取消进路({3})',
trainingRemark: '取消进路',
trainingType: 'Signal',
@ -559,131 +334,31 @@ export default {
{ deviceType: '04', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 8,
minDuration: 5,
operateType: 'Signal_Reopen_Signal',
skinCode: '06',
trainingName: '信号重开({3} 进路)',
trainingRemark: '信号重开功能',
trainingType: 'Signal',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '304', tip: '鼠标右键菜单选择【信号重开】' },
{ deviceType: '04', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: 'Signal_Open_Auto_Setting',
skinCode: '06',
skinCode: '09',
trainingName: '进路交自动控({5})',
trainingRemark: '进路交自动控',
trainingType: 'Signal',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '315', tip: '鼠标右键菜单选择【进路交自动控】' },
{ deviceType: '04', orderNum: 2, operateCode: '3151', tip: '鼠标左键选择【{3}】进路', val: '{4}' },
{ deviceType: '04', orderNum: 3, operateCode: '009', tip: '鼠标左键点击【确定】按钮' }
{ deviceType: '04', orderNum: 1, operateCode: '315', tip: '鼠标右键菜单选择【开放自动进路】' },
{ deviceType: '04', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: 'Signal_Close_Auto_Setting',
skinCode: '06',
skinCode: '09',
trainingName: '进路交人工控({5})',
trainingRemark: '进路交人工控',
trainingType: 'Signal',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '314', tip: '鼠标右键菜单选择【进路交人工控】' },
{ deviceType: '04', orderNum: 2, operateCode: '3141', tip: '鼠标左键选择【{3}】进路', val: '{4}' },
{ deviceType: '04', orderNum: 3, operateCode: '009', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: 'Signal_Set_CI_Auto',
skinCode: '06',
trainingName: '设置通过模式({5})',
trainingRemark: '设置通过模式',
trainingType: 'Signal',
productTypes: ['02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '309', tip: '鼠标右键菜单选择【设置通过模式】' },
{ deviceType: '04', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: 'Signal_Set_CI_Auto',
skinCode: '06',
trainingName: 'Fleet进路办理({5})',
trainingRemark: 'Fleet进路办理',
trainingType: 'Signal',
productTypes: ['01'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '309', tip: '鼠标右键菜单选择【Fleet进路办理】' },
{ deviceType: '04', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: 'Signal_Cancel_CI_Auto',
skinCode: '06',
trainingName: '取消通过模式({5})',
trainingRemark: '取消通过模式',
trainingType: 'Signal',
productTypes: ['02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '310', tip: '鼠标右键菜单选择【取消通过模式】' },
{ deviceType: '04', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: 'Signal_Cancel_CI_Auto',
skinCode: '06',
trainingName: 'Fleet进路取消({5})',
trainingRemark: 'Fleet进路取消',
trainingType: 'Signal',
productTypes: ['01'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '310', tip: '鼠标右键菜单选择【Fleet进路取消】' },
{ deviceType: '04', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: 'Signal_Cancel_Guide',
skinCode: '06',
trainingName: '人工解锁进路({5})',
trainingRemark: '人工解锁进路',
trainingType: 'Signal',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '318', tip: '鼠标右键菜单选择【人工解锁进路】' },
{ deviceType: '04', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: 'Signal_Set_Guide',
skinCode: '06',
trainingName: '信号机引导办理({5})',
trainingRemark: '信号机引导办理',
trainingType: 'Signal',
productTypes: ['01'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '308', tip: '鼠标右键菜单选择【信号机引导办理】' },
{ deviceType: '04', orderNum: 1, operateCode: '314', tip: '鼠标右键菜单选择【关闭自动进路】' },
{ deviceType: '04', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【确定】按钮' }
]
},
@ -691,53 +366,52 @@ export default {
maxDuration: 15,
minDuration: 8,
operateType: 'Signal_Block',
skinCode: '06',
skinCode: '09',
trainingName: '信号封锁({5})',
trainingRemark: '信号封锁',
trainingType: 'Signal',
productTypes: ['01'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '306', tip: '鼠标右键菜单选择【信号封锁】' },
{ deviceType: '04', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【确定】按钮' }
{ deviceType: '04', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【发送请求】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: 'Signal_Unblock',
skinCode: '06',
skinCode: '09',
trainingName: '信号解封({5})',
trainingRemark: '信号解封功能',
trainingType: 'Signal',
productTypes: ['01'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '307', tip: '鼠标右键菜单选择【信号解封】' },
{ deviceType: '03', orderNum: 2, operateCode: '3073', tip: '鼠标左键点击【确定】按钮' },
{ deviceType: '03', orderNum: 3, operateCode: '3076', tip: '鼠标左键选择({5})区段', val: '{6}' },
{ deviceType: '03', orderNum: 4, operateCode: '3074', tip: '鼠标左键点击【确定】按钮' },
{ deviceType: '03', orderNum: 5, operateCode: '3072', tip: '鼠标左键点击【关闭】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: 'Signal_Find_Routes_Status',
skinCode: '06',
trainingName: '查询进路控制状态({5})',
trainingRemark: '查询进路控制状态',
trainingType: 'Signal',
productTypes: ['01', '02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '316', tip: '鼠标右键菜单选择【查询进路控制状态】' },
{ deviceType: '04', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【确定】按钮' }
{ deviceType: '03', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【发送请求】按钮' },
{ deviceType: '03', orderNum: 3, operateCode: '307', tip: '鼠标右键点击【E】选择使能' },
{ deviceType: '03', orderNum: 4, operateCode: '009', tip: '鼠标左键点击【发送请求】按钮' }
]
},
// {
// maxDuration: 15,
// minDuration: 8,
// operateType: 'Signal_Find_Routes_Status',
// skinCode: '09',
// trainingName: '查询进路控制状态({5})',
// trainingRemark: '查询进路控制状态',
// trainingType: 'Signal',
// productTypes: ['01', '02'],
// stepVOList: [
// { deviceType: '04', orderNum: 1, operateCode: '316', tip: '鼠标右键菜单选择【查询进路控制状态】' },
// { deviceType: '04', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【确定】按钮' }
// ]
// },
{
maxDuration: 20,
minDuration: 15,
operateType: 'CM_Apply_For_Center_Control',
skinCode: '06',
skinCode: '09',
trainingName: '请求遥控({1})',
trainingRemark: '控制权限转换,站控转中控',
trainingType: 'ControlConvertMenu',
@ -751,7 +425,7 @@ export default {
maxDuration: 15,
minDuration: 8,
operateType: 'CM_Apply_For_Station_Control',
skinCode: '06',
skinCode: '09',
trainingName: '请求站控({1})',
trainingRemark: '控制权限转换,中控转站控',
trainingType: 'ControlConvertMenu',
@ -760,34 +434,6 @@ export default {
{ deviceType: 'button', orderNum: 1, operateCode: '202', tip: '鼠标右键菜单选择【请求站控】'},
{ deviceType: '05', orderNum: 2, operateCode: '2023', tip: '鼠标左键点击【应用】' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: 'Signal_Set_Auto_Turn_Back',
skinCode: '06',
trainingName: '设置自动折返进路({3})',
trainingRemark: '设置自动折返进路',
trainingType: 'Signal',
productTypes: ['02'],
stepVOList: [
{ deviceType: '05', orderNum: 1, operateCode: '900', tip: '鼠标右键菜单选择【设置自动折返】'},
{ deviceType: '05', orderNum: 2, operateCode: '900', tip: '鼠标左键点击【应用】' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: 'Signal_Cancel_Auto_Turn_Back',
skinCode: '06',
trainingName: ' 取消自动折返进路({3})',
trainingRemark: ' 取消自动折返进路',
trainingType: 'Signal',
productTypes: ['02'],
stepVOList: [
{ deviceType: '05', orderNum: 1, operateCode: '901', tip: '鼠标右键菜单选择【取消自动折返】'},
{ deviceType: '05', orderNum: 2, operateCode: '901', tip: '鼠标左键点击【应用】' }
]
}
]
};

View File

@ -238,11 +238,11 @@ export const OperationEvent = {
commandXian: {
confirm: {
operation: '009',
domId: '_Tips-commandXian-confirm{TOP}'
domId: '_Tips-commandXian-confirm{BOTTOM}'
},
cancel: {
operation: '0091',
domId: '_Tips-commandXian-cancel{TOP}'
domId: '_Tips-commandXian-cancel{BOTTOM}'
}
}
},

75
src/utils/indexedDb.js Normal file
View File

@ -0,0 +1,75 @@
import Vue from 'vue';
// 创建或者打开数据库
export function openIndexedDB() {
const request = window.indexedDB.open('joylinkDb', 1);
request.onerror = function (event) {
console.log('数据库打开报错');
};
request.onsuccess = function (event) {
Vue.prototype.$db = request.result;
console.log('数据库打开成功');
};
request.onupgradeneeded = function (event) {
Vue.prototype.$db = event.target.result;
Vue.prototype.$db.createObjectStore('mapData', { keyPath: 'id' });
Vue.prototype.$db.createObjectStore('runPlan', { keyPath: 'id' });
};
}
// 新增数据
export function dbAddData(tableName, data, successCallback, errorCallback) {
if (Vue.prototype.$db) {
const request = Vue.prototype.$db.transaction([tableName], 'readwrite').objectStore(tableName).add(data);
request.onsuccess = successCallback || function (event) { console.log('数据写入成功'); };
request.onerror = errorCallback || function (event) { console.log('数据写入失败'); };
} else {
openIndexedDB();
setTimeout(() => {
dbAddData(tableName, data, successCallback, errorCallback);
}, 500);
}
}
// 读取数据
export function dbReadData(tableName, key, successCallback, errorCallback) {
if (Vue.prototype.$db) {
const request = Vue.prototype.$db.transaction([tableName]).objectStore(tableName).get(key);
request.onsuccess = successCallback(request.result) || function(event) { console.log('事务成功'); };
request.onerror = errorCallback || function(event) { console.log('事务失败'); };
} else {
openIndexedDB();
setTimeout(() => {
dbReadData(tableName, key, successCallback, errorCallback);
}, 500);
}
}
// 修改数据
export function dbUpdateData(tableName, data, successCallback, errorCallback) {
if (Vue.prototype.$db) {
const request = Vue.prototype.$db.transaction([tableName], 'readwrite').objectStore(tableName).put(data);
request.onsuccess = successCallback || function (event) { console.log('数据更新成功'); };
request.onerror = errorCallback || function (event) { console.log('数据更新失败'); };
} else {
openIndexedDB();
setTimeout( ()=> {
dbUpdateData(tableName, data, successCallback, errorCallback);
}, 500);
}
}
// 删除数据
export function dbDeleteData(tableName, key, successCallback, errorCallback) {
if (Vue.prototype.$db) {
const request = Vue.prototype.$db.transaction([tableName], 'readwrite').objectStore(tableName).delete(key);
request.onsuccess = successCallback || function (event) { console.log('数据删除成功'); };
request.onerror = errorCallback || function(event) { console.log('数据删除失败'); };
} else {
openIndexedDB();
setTimeout(()=> {
dbDeleteData(tableName, key, successCallback, errorCallback);
}, 500);
}
}

View File

@ -20,15 +20,13 @@ export function getAutoReentryBySignalCode(signalCode, routeList, autoReentryLis
const autoReentry = [];
routeList.forEach(item => {
if (item.startSignalCode === signalCode && item.turnBack) {
route.push(item);
route.push(item.code);
}
});
autoReentryList.forEach(item => {
route.forEach(it => {
if (item.turnBackRouteCode === it.code || item.turnBackRoute2Code === it.code) {
autoReentry.push(item);
}
});
if (route.includes(item.turnBackRouteCode) || route.includes(item.turnBackRoute2Code)) {
autoReentry.push(item);
}
});
return autoReentry;
}

View File

@ -3,8 +3,8 @@
<div class="lesson-header">
<div class="lesson-list">草稿{{ $t('lesson.courseList') }}</div>
<div class="but-group">
<el-button v-if="hasRelease" size="mini" @click="operationManage">{{ $t('lesson.trainingRule') }}</el-button>
<el-button v-if="hasRelease" size="mini" @click="trainingManage">{{ $t('lesson.trainingManage') }}</el-button>
<el-button v-if="isAdmin" size="mini" @click="operationManage">{{ $t('lesson.trainingRule') }}</el-button>
<el-button v-if="isAdmin" size="mini" @click="trainingManage">{{ $t('lesson.trainingManage') }}</el-button>
<el-button size="mini" type="primary" @click="lessonCreateByPublish">{{ $t('lesson.createNewCoursesFromRelease') }}</el-button>
<el-button size="mini" type="primary" @click="lessonCreate">{{ $t('lesson.newConstruction') }}</el-button>
</div>
@ -137,6 +137,9 @@ export default {
mapId() {
return this.$route.params.mapId;
},
isAdmin() {
return this.$store.state.user.roles.includes('04') || this.$store.state.user.roles.includes('05');
},
hasRelease() {
return this.$store.state.user.roles.includes('04') ||
this.$store.state.user.roles.includes('05') || this.$store.state.user.roles.includes('03');

View File

@ -6,7 +6,7 @@
:before-close="handleClose"
>
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-form-item label="留言板名称:" prop="title">
<el-form-item label="留言板名称" prop="title">
<el-input v-model="form.title" style="width: 200px;" />
</el-form-item>
<el-form-item label="归属项目:" prop="project">
@ -99,6 +99,7 @@ export default {
this.$emit('reloadTable');
this.handleClose();
}).catch((error) => {
console.error(error.message);
if (error.code == '10012') {
this.$message.error('本项目下的留言板已存在,请勿重复创建!');
} else {

View File

@ -9,7 +9,6 @@
import { queryPostPage } from '@/api/learn';
import { ProjectList} from '@/scripts/ProjectConfig';
import CreateDraft from './create';
export default {
name: 'Manage',
components:{

View File

@ -87,8 +87,7 @@ export default {
});
},
methods:{
doShow(param) {
// this.operationType = param;
doShow() {
this.dialogVisible = true;
},
doClose() {
@ -106,8 +105,7 @@ export default {
const notifyData = this.$notify({
title: res.data.name,
dangerouslyUseHTMLString: true,
message: `
<p><span style="color: #000;font-weight: bold;">场景描述</span>${row.description}</p>`,
message: `<p><span style="color: #000;font-weight: bold;">场景描述:</span>${row.description}</p>`,
customClass: 'notify_box',
showClose: false,
offset: 75,
@ -172,11 +170,6 @@ export default {
member.label = '停车场信号楼' + (member.name ? member.name : '');
}
}
// if (member.type === 'DISPATCHER') {
// this.memberId = member.id;
// (this.$store.state.training.memberData[member.id] || {}).userId = this.$store.state.user.id;
// (this.$store.state.training.memberData[member.id] || {}).disabled = true;
// }
});
}
if (res.data.mapLocation) {

View File

@ -41,11 +41,11 @@
<div class="trainExampleName">列车 颜色图例</div>
<div class="eachTrainExample">
<span class="smallExample" />
<span class="eachTrainExampleName">0 ~ 100</span>
<span class="eachTrainExampleName">0 ~ 400</span>
</div>
<div class="eachTrainExample">
<span class="mediumExample" />
<span class="eachTrainExampleName">100 ~ 400</span>
<span class="eachTrainExampleName">400 ~ 1000</span>
</div>
<div class="eachTrainExample">
<span class="bigExample" />
@ -129,7 +129,7 @@ export default {
currentFlowDataId:'',
isDisabled:false,
loading:false,
messageBoard: false
messageBoard: false
};
},
computed:{

View File

@ -282,7 +282,6 @@ export default {
this.activeName = 'first';
this.editModel = deepAssign(this.editModel, selected);
//
console.log(selected, selected.createTurnBack);
const beCentralizedStation = {};
this.relStationList = JSON.parse(JSON.stringify(this.stationList));
this.stationList.forEach(data=>{

View File

@ -3,9 +3,9 @@
<menu-bar
ref="menuBar"
:plan-convert="PlanConvert"
:run-plan-list="runPlanList"
:load-run-plan-id="loadRunPlanId"
@doClose="doClose"
@refresh="refresh"
@dispatchDialog="dispatchDialog"
@loadingRunPlan="loadingRunPlan"
@checkIsLoadRunPlan="checkIsLoadRunPlan"
@ -17,7 +17,7 @@
:load-run-plan-id="loadRunPlanId"
:load-run-plan-name="loadRunPlanName"
/>
<status-bar ref="statusBar" :load-run-plan-id="loadRunPlanId" @dispatchDialog="dispatchDialog" @showTrain="showTrain" />
<status-bar ref="statusBar" :load-run-plan-id="loadRunPlanId" @dispatchDialog="dispatchDialog" @showTrain="showTrain" @refresh="refresh" />
<parameter ref="parameter" />
<off-line ref="offLine" @handleConfirm="handleConfirm" @dispatchDialog="dispatchDialog" />
<add-planning-train ref="addPlanningTrain" :load-run-plan-id="loadRunPlanId" @dispatchDialog="dispatchDialog" />
@ -27,9 +27,8 @@
@dispatchOperate="dispatchOperate"
@refresh="refresh"
/>
<!-- <edit-smooth-run-time ref="editSmoothRunTime" @dispatchDialog="dispatchDialog" /> -->
<!-- <add-smooth-run-time ref="addSmoothRunTime" @dispatchDialog="dispatchDialog" /> -->
<duplicate-train ref="duplicateTrain" @dispatchDialog="dispatchDialog" @dispatchOperate="dispatchOperate" @refresh="refresh" />
<move-planing-train ref="movePlaningTrain" :load-run-plan-id="loadRunPlanId" @dispatchDialog="dispatchDialog" @dispatchOperate="dispatchOperate" @refresh="refresh" />
<modifying-routing ref="modifyingRouting" @dispatchDialog="dispatchDialog" />
<modifying-begin-time ref="modifyingBeginTime" />
@ -43,7 +42,6 @@
<modifying-station-interval-time ref="modifyingStationIntervalTime" />
<modifying-station-stop-time ref="modifyingStationStopTime" />
<populating-generic-data ref="populatingGenericData" :load-run-plan-id="loadRunPlanId" />
<create-empty-plan ref="createEmptyPlan" @refresh="refreshRunPlanList" />
<edit-plan-name ref="editPlan" @renewal="refreshRunPlanName" />
<gernarate-plan ref="gernaratePlanTrain" />
</div>
@ -67,15 +65,12 @@ import ModifyingRouting from './menus/modifyingRouting';
import ModifyingBeginTime from './menus/modifyingBeginTime';
import EditStationBetweenTime from './menus/editStationBetweenTime';
import GernaratePlan from './menus/gernaratePlanTrain';
// import AddSmoothRunTime from './menus/addSmoothRunTime';
// import EditSmoothRunTime from './menus/editSmoothRunTime';
import MovePlaningTrain from './menus/movePlaningTrain';
import ModifyingStationIntervalTime from './menus/modifyingStationIntervalTime';
import ModifyingStationStopTime from './menus/modifyingStationStopTime';
import PopulatingGenericData from './menus/populatingGenericData';
import CreateEmptyPlan from './menus/createEmptyPlan';
import { deletePlanService } from '@/api/runplan';
import { checkLoginLine } from '@/api/login';
import { getRpListByMapId } from '@/api/runplan';
import { getPublishMapDetailById } from '@/api/jmap/map';
export default {
@ -101,9 +96,9 @@ export default {
// EditSmoothRunTime,
ModifyingStationIntervalTime,
ModifyingStationStopTime,
CreateEmptyPlan,
EditPlanName,
GernaratePlan
GernaratePlan,
MovePlaningTrain
},
data() {
return {
@ -126,6 +121,8 @@ export default {
this.timeDemon = setInterval(() => {
checkLoginLine();
}, 5000 * 60);
this.loadRunPlanId = this.$route.query.planId;
this.loadRunPlanName = this.$route.query.planName;
if (this.$route.query.mapId) {
this.refreshRunPlanList(true);
await this.loadMap();
@ -186,15 +183,7 @@ export default {
this.$store.dispatch('runPlan/refresh');
},
refreshRunPlanList(firstLoad) {
getRpListByMapId(this.$route.query.mapId).then(resp => {
this.runPlanList = resp.data || [];
if (firstLoad && this.runPlanList.length) {
this.loadRunPlanId = this.runPlanList[0].id;
this.loadRunPlanName = this.runPlanList[0].name;
}
}).catch(() => {
this.$message.error('获取草稿运行图列表失败');
});
},
doClose() {
this.$emit('doClose');

View File

@ -117,7 +117,7 @@
import { mapGetters } from 'vuex';
import routeMap from './routingoperate/routeMap';
// import RunplanParams from './config/index';
import { planEffectiveCheck, runPlanNotify } from '@/api/runplan';
import { planEffectiveCheck, runPlanNotify, clearPlaningData } from '@/api/runplan';
import { launchFullscreen } from '@/utils/screen';
import { UrlConfig } from '@/scripts/ConstDic';
import { EventBus } from '@/scripts/event-bus';
@ -133,12 +133,6 @@ export default {
return { };
}
},
runPlanList: {
type: Array,
default: function() {
return [];
}
},
loadRunPlanId: {
type: String,
default: function() {
@ -230,6 +224,10 @@ export default {
title: this.$t('planMonitor.deletePlan'),
click: this.handleDeletePlanningTrain
},
{
title: '移动计划',
click: this.handleMovePlanningTrain
},
{
title: this.$t('planMonitor.duplicatePlan'),
click: this.handleDuplicateTrain
@ -252,6 +250,10 @@ export default {
{
title: '修改名称',
click: this.modifyRunPlanName
},
{
title: '清除数据',
click: this.handleClearData
}
// {
// type: 'separator'
@ -311,9 +313,6 @@ export default {
},
'$route.query.planId': function () {
this.menus = this.menuConvert(this.menuBase);
},
runPlanList() {
this.initMenu();
}
},
created() {
@ -486,12 +485,16 @@ export default {
async handleTestRunPlan() {
const data = { planId: this.$route.query.planId || this.loadRunPlanId };
runPlanNotify(data).then(resp => {
const query = {
prdType: '01', group: resp.data, mapId: this.$route.query.mapId, planId: this.$route.query.planId
};
// this.$router.push({ path: `${UrlConfig.display}/plan`, query: query });
this.$router.push({ path: UrlConfig.design.testRunPlan, query: query });
launchFullscreen();
if (resp.data) {
const query = {
prdType: '01', group: resp.data, mapId: this.$route.query.mapId, planId: this.$route.query.planId
};
// this.$router.push({ path: `${UrlConfig.display}/plan`, query: query });
this.$router.push({ path: UrlConfig.design.testRunPlan, query: query });
launchFullscreen();
} else {
this.$messageBox(this.$t('error.checkTheValidityFirst'));
}
}).catch(error => {
this.$messageBox(this.$t('tip.createSimulationFaild') + this.$t('global.colon') + error.message);
});
@ -509,6 +512,23 @@ export default {
this.$messageBox(this.$t('tip.selectARunGraphFirst'));
}
},
//
handleClearData() {
this.$confirm('本操作将清除本运行图数据!', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
center: true
}).then(() => {
clearPlaningData(this.$route.query.planId).then(resp => {
console.log('清除数据成功!');
this.$emit('refresh');
}).catch(() => {
this.$message.error('清除数据失败!');
});
}).catch(() => {
console.error('清除数据失败!');
});
},
//
handleDeletePlanningTrain() {
const serviceNumber = this.$store.state.runPlan.selected.serviceNumber;
@ -536,6 +556,15 @@ export default {
this.$messageBox(this.$t('tip.selectAPlan'));
}
},
//
handleMovePlanningTrain() {
const serviceNumber = this.$store.state.runPlan.selected.serviceNumber;
if (serviceNumber) {
this.$emit('dispatchDialog', { name: 'movePlaningTrain', params: { serviceNumber } });
} else {
this.$messageBox(this.$t('tip.selectAPlan'));
}
},
//
handleDuplicateTrain() {
const serviceNumber = this.$store.state.runPlan.selected.serviceNumber;

View File

@ -120,7 +120,6 @@ export default {
}
},
mounted() {
},
methods: {
async initLoad() {
@ -130,6 +129,8 @@ export default {
}
},
doShow() {
this.newModel.map = this.$route.params.mapId || this.$route.query.mapId;
this.pullModel.mapId = this.$route.params.mapId || this.$route.query.mapId;
this.dialogShow = true;
this.initLoad();
},

View File

@ -195,6 +195,7 @@ export default {
}).catch(error => {
console.log(error);
this.doClose();
this.$messageBox(error.message);
});
});
}

View File

@ -0,0 +1,107 @@
<template>
<el-dialog
v-dialogDrag
class="planEdit__tool duplicate-train"
:title="title"
:visible.sync="dialogShow"
width="420px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row type="flex" justify="center">
<el-radio-group v-model="model.forward">
<el-radio :label="true">{{ $t('planMonitor.forward') }}</el-radio>
<el-radio :label="false">{{ $t('planMonitor.backward') }}</el-radio>
</el-radio-group>
</el-row>
<el-row style="margin: 10px 0px">
<el-col :span="5" :offset="4">{{ $t('planMonitor.intervals') }}</el-col>
<el-col :span="10">
<el-input-number v-model="model.intervals" size="mini" :min="30" controls-position="right" />
<span>{{ $t('global.second') }}</span>
</el-col>
</el-row>
<span slot="footer" class="dialog-footer">
<el-button size="medium" @click="doClose">{{ $t('global.cancel') }}</el-button>
<el-button type="primary" size="medium" @click="handleCommit">{{ $t('global.confirm') }}</el-button>
</span>
</el-dialog>
</template>
<script>
import { movePlaningService } from '@/api/runplan';
export default {
name: 'MovePlaningTrain',
components: {
},
props: {
loadRunPlanId: {
type: String,
default() {
return '';
}
}
},
data() {
return {
dialogShow: false,
loading: false,
model: {
serviceNumber: '',
forward: false,
intervals: 0
}
};
},
computed: {
title() {
return '平移列车';
}
},
mounted() {
},
methods: {
doShow(params) {
this.model.serviceNumber = params.serviceNumber;
this.dialogShow = true;
},
doClose() {
this.loading = false;
this.dialogShow = false;
},
handleCommit() {
this.model['planId'] = this.$route.query.planId || this.loadRunPlanId;
this.model['serviceNumber'] = this.model.serviceNumber;
this.doClose();
movePlaningService(this.model).then(resp => {
this.$emit('refresh');
this.$message.success('平移列车成功!');
}).catch((error) => {
if (error.code === 500001) {
this.$messageBox('平移列车失败' + this.$t('tip.duplicatePlanFailedTips'));
} else {
this.$messageBox('平移列车失败!');
}
});
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.duplicate-train{
/deep/ {
.el-dialog__body{
padding: 0 20px;
}
.dialog-footer{
display: flex;
justify-content: center;
}
}
}
</style>

View File

@ -41,7 +41,7 @@
</el-form-item>
<el-form-item :label="$t('map.endStationColon')" prop="endStationCode">
<!-- :disabled="!isStartSelected" -->
<el-select v-model="addModel.endStationCode" clearable :filterable="true" disabled @change="changeEndStation">
<el-select v-model="addModel.endStationCode" :filterable="true" disabled @change="changeEndStation">
<el-option
v-for="item in filterStationList"
:key="item.code"
@ -56,7 +56,7 @@
>{{ $t('map.activate') }}</el-button> -->
</el-form-item>
<el-form-item :label="$t('map.endSectionColon')" prop="endSectionCode">
<el-select v-model="addModel.endSectionCode" clearable :filterable="true" :disabled="editShow || !isStartSelected" @change="changeEndSection">
<el-select v-model="addModel.endSectionCode" :filterable="true" clearable :disabled="editShow || !isStartSelected" @change="changeEndSection">
<el-option
v-for="item in filterSectionList"
:key="item.code"
@ -368,6 +368,10 @@ export default {
} else if (selected._type.toUpperCase() === 'Section'.toUpperCase() && this.field.toUpperCase() === 'endSectionCode'.toUpperCase()) {
// selected.reentryTrack ||
if (selected.standTrack || selected.transferTrack) {
if (this.addModel.startSectionCode == selected.code) {
this.$message.error('起始区段和终到区段不能相同');
return false;
}
if (selected.belongStation) {
this.addModel.endStationCode = selected.belongStation;
}
@ -451,12 +455,19 @@ export default {
this.addEndSectionData(true);
},
changeEndSection(data) {
const section = this.$store.getters['map/getDeviceByCode'](data);
if (section.belongStation) {
this.addModel.endStationCode = section.belongStation;
if (data) {
const section = this.$store.getters['map/getDeviceByCode'](data);
if (section.belongStation) {
this.addModel.endStationCode = section.belongStation;
}
this.addModel.destinationCode = section.destinationCode || '';
this.judgeAllowSelected();
this.addEndSectionData(false);
} else {
this.addModel.endStationCode = '';
this.addModel.endSectionCode = '';
this.addModel.parkSectionCodeList.pop();
}
this.judgeAllowSelected();
this.addEndSectionData(false);
},
judgeAllowSelected() {
if (this.addModel.startStationCode != '' && this.addModel.startSectionCode != '' && this.addModel.endStationCode != '' && this.addModel.endSectionCode != '') {
@ -603,11 +614,12 @@ export default {
}
} else {
if (index < 0) {
if (list.length >= 2) {
list.splice(list.length - 1, 1, data);
} else {
list.push(data);
}
// debugger;
// if (list.length >= 2) {
// list.splice(list.length - 1, 1, data);
// } else {
list.push(data);
// }
} else {
if (index == 0 && list.length >= 2) {
this.addModel.endSectionCode = list[list.length - 1].sectionCode;

View File

@ -6,10 +6,12 @@
<div class="li_plan" @click="handleGernaratePlanningTrain">{{ $t('planMonitor.gerneratePlan') }}</div>
<div class="li_plan" @click="handleAddPlanningTrain">{{ $t('planMonitor.addPlan') }}</div>
<div class="li_plan" @click="handleDeletePlanningTrain">{{ $t('planMonitor.deletePlan') }}</div>
<div class="li_plan" @click="handleMovePlanningTrain">平移计划</div>
<div class="li_plan" @click="handleDuplicateTrain">{{ $t('planMonitor.duplicatePlan') }}</div>
<div class="li_plan" @click="handleAddTask">{{ $t('planMonitor.addTask') }}</div>
<div class="li_plan" @click="handleDeleteTask">{{ $t('planMonitor.deleteTask') }}</div>
<div class="li_plan" @click="handleModifyingTask">{{ $t('planMonitor.modifyTask') }}</div>
<div class="li_plan" @click="handleClearData">清除数据</div>
</ul>
<ul class="ul-box tool">
<div class="li_plan" @click="handlePlanEffectiveCheck">{{ $t('planMonitor.validityCheck') }}</div>
@ -19,7 +21,7 @@
</template>
<script>
import { planEffectiveCheck, runPlanNotify } from '@/api/runplan';
import { planEffectiveCheck, runPlanNotify, clearPlaningData } from '@/api/runplan';
import { launchFullscreen } from '@/utils/screen';
import { UrlConfig } from '@/scripts/ConstDic';
@ -87,6 +89,14 @@ export default {
this.$messageBox(this.$t('tip.selectAPlan'));
}
},
handleMovePlanningTrain() {
const serviceNumber = this.$store.state.runPlan.selected.serviceNumber;
if (serviceNumber) {
this.$emit('dispatchDialog', { name: 'movePlaningTrain', params: { serviceNumber } });
} else {
this.$messageBox(this.$t('tip.selectAPlan'));
}
},
//
handleDuplicateTrain() {
const serviceNumber = this.$store.state.runPlan.selected.serviceNumber;
@ -123,7 +133,23 @@ export default {
this.$messageBox(this.$t('tip.selectATrain'));
}
},
//
handleClearData() {
this.$confirm('本操作将清除本运行图数据!', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
center: true
}).then(() => {
clearPlaningData(this.$route.query.planId).then(resp => {
console.log('清除数据成功!');
this.$emit('refresh');
}).catch(() => {
this.$message.error('清除数据失败!');
});
}).catch(() => {
console.error('清除数据失败!');
});
},
//
handlePlanEffectiveCheck() {
const planId = this.$route.query.planId;

View File

@ -20,7 +20,7 @@
:max-height="height"
:max-width="width"
/>
<status-bar ref="statusBar" :load-run-plan-id="loadRunPlanId" @dispatchDialog="dispatchDialog" @showTrain="showTrain" />
<status-bar ref="statusBar" :load-run-plan-id="loadRunPlanId" @dispatchDialog="dispatchDialog" @showTrain="showTrain" @refresh="refresh" />
<parameter ref="parameter" />
<off-line ref="offLine" @handleConfirm="handleConfirm" @dispatchDialog="dispatchDialog" />
<add-planning-train ref="addPlanningTrain" :load-run-plan-id="loadRunPlanId" @dispatchDialog="dispatchDialog" />
@ -34,6 +34,7 @@
<edit-smooth-run-time ref="editSmoothRunTime" @dispatchDialog="dispatchDialog" />
<add-smooth-run-time ref="addSmoothRunTime" @dispatchDialog="dispatchDialog" />
<duplicate-train ref="duplicateTrain" :load-run-plan-id="loadRunPlanId" @dispatchDialog="dispatchDialog" @dispatchOperate="dispatchOperate" @refresh="refresh" />
<move-planing-train ref="movePlaningTrain" :load-run-plan-id="loadRunPlanId" @dispatchDialog="dispatchDialog" @dispatchOperate="dispatchOperate" @refresh="refresh" />
<modifying-routing ref="modifyingRouting" @dispatchDialog="dispatchDialog" />
<modifying-begin-time ref="modifyingBeginTime" />
@ -63,6 +64,7 @@ import AddPlanningTrain from './menus/addPlanningTrain';
import EditPlanningTrain from './menus/editPlanningTrain';
import EditPlanName from './menus/editPlanName';
import DuplicateTrain from './menus/duplicateTrain';
import MovePlaningTrain from './menus/movePlaningTrain';
import SystermOut from './menus/systermOut';
import AddTask from './menus/addTask';
import DeleteTask from './menus/deleteTask';
@ -109,7 +111,8 @@ export default {
CreateEmptyPlan,
EditPlanName,
GernaratePlan,
ModifyingStationStopTime
ModifyingStationStopTime,
MovePlaningTrain
},
data() {
return {

View File

@ -131,7 +131,7 @@
</template>
<script>
import { mapGetters } from 'vuex';
import { planEffectiveCheck } from '@/api/runplan';
import { planEffectiveCheck, clearPlaningData } from '@/api/runplan';
import { EventBus } from '@/scripts/event-bus';
import { publishRunPlanAllUser } from '@/api/designPlatform';
import routeMap from '../editTool/routingoperate/routeMap';
@ -236,6 +236,10 @@ export default {
title: this.$t('planMonitor.deletePlan'),
click: this.handleDeletePlanningTrain
},
{
title: '移动计划',
click: this.handleMovePlanningTrain
},
{
title: this.$t('planMonitor.duplicatePlan'),
click: this.handleDuplicateTrain
@ -258,6 +262,10 @@ export default {
{
title: '修改名称',
click: this.modifyRunPlanName
},
{
title: '清除数据',
click: this.handleClearData
}
]
},
@ -458,6 +466,23 @@ export default {
this.$messageBox(this.$t('tip.selectARunGraphFirst'));
}
},
//
handleClearData() {
this.$confirm('本操作将清除本运行图数据!', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
center: true
}).then(() => {
clearPlaningData(this.loadRunPlanId).then(resp => {
console.log('清除数据成功!');
this.$emit('refresh', this.loadRunPlanId);
}).catch(() => {
this.$message.error('清除数据失败!');
});
}).catch(() => {
console.error('清除数据失败!');
});
},
newRunPlan() {
this.$emit('dispatchDialog', { name: 'createEmptyPlan', params: {}});
},
@ -554,6 +579,15 @@ export default {
this.$messageBox(this.$t('tip.selectAPlan'));
}
},
//
handleMovePlanningTrain() {
const serviceNumber = this.$store.state.runPlan.draftSelected.serviceNumber;
if (serviceNumber) {
this.$emit('dispatchDialog', { name: 'movePlaningTrain', params: { serviceNumber } });
} else {
this.$messageBox(this.$t('tip.selectAPlan'));
}
},
//
handleDuplicateTrain() {
const serviceNumber = this.$store.state.runPlan.draftSelected.serviceNumber;

View File

@ -120,7 +120,6 @@ export default {
}
},
mounted() {
},
methods: {
async initLoad() {
@ -130,6 +129,8 @@ export default {
}
},
doShow() {
this.newModel.map = this.$route.params.mapId || this.$route.query.mapId;
this.pullModel.mapId = this.$route.params.mapId || this.$route.query.mapId;
this.dialogShow = true;
this.initLoad();
},

View File

@ -0,0 +1,107 @@
<template>
<el-dialog
v-dialogDrag
class="planEdit__tool duplicate-train"
:title="title"
:visible.sync="dialogShow"
width="420px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row type="flex" justify="center">
<el-radio-group v-model="model.forward">
<el-radio :label="true">{{ $t('planMonitor.forward') }}</el-radio>
<el-radio :label="false">{{ $t('planMonitor.backward') }}</el-radio>
</el-radio-group>
</el-row>
<el-row style="margin: 10px 0px">
<el-col :span="5" :offset="4">{{ $t('planMonitor.intervals') }}</el-col>
<el-col :span="10">
<el-input-number v-model="model.intervals" size="mini" :min="30" controls-position="right" />
<span>{{ $t('global.second') }}</span>
</el-col>
</el-row>
<span slot="footer" class="dialog-footer">
<el-button size="medium" @click="doClose">{{ $t('global.cancel') }}</el-button>
<el-button type="primary" size="medium" @click="handleCommit">{{ $t('global.confirm') }}</el-button>
</span>
</el-dialog>
</template>
<script>
import { movePlaningService } from '@/api/runplan';
export default {
name: 'MovePlaningTrain',
components: {
},
props: {
loadRunPlanId: {
type: String,
default() {
return '';
}
}
},
data() {
return {
dialogShow: false,
loading: false,
model: {
serviceNumber: '',
forward: false,
intervals: 0
}
};
},
computed: {
title() {
return this.$t('planMonitor.duplicateTrain');
}
},
mounted() {
},
methods: {
doShow(params) {
this.model.serviceNumber = params.serviceNumber;
this.dialogShow = true;
},
doClose() {
this.loading = false;
this.dialogShow = false;
},
handleCommit() {
this.model['planId'] = this.loadRunPlanId;
this.model['serviceNumber'] = this.model.serviceNumber;
this.doClose();
movePlaningService(this.model).then(resp => {
this.$emit('refresh');
this.$message.success(this.$t('tip.duplicatePlanSuccessful'));
}).catch((error) => {
if (error.code === 500001) {
this.$messageBox(this.$t('tip.duplicatePlanFailed') + this.$t('tip.duplicatePlanFailedTips'));
} else {
this.$messageBox(this.$t('tip.duplicatePlanFailed'));
}
});
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.duplicate-train{
/deep/ {
.el-dialog__body{
padding: 0 20px;
}
.dialog-footer{
display: flex;
justify-content: center;
}
}
}
</style>

View File

@ -8,10 +8,12 @@
<!-- <ul class="ul-box"> -->
<div class="li_plan" @click="handleAddPlanningTrain">{{ $t('planMonitor.addPlan') }}</div>
<div class="li_plan" @click="handleDeletePlanningTrain">{{ $t('planMonitor.deletePlan') }}</div>
<div class="li_plan" @click="handleMovePlanningTrain">平移计划</div>
<div class="li_plan" @click="handleDuplicateTrain">{{ $t('planMonitor.duplicatePlan') }}</div>
<div class="li_plan" @click="handleAddTask">{{ $t('planMonitor.addTask') }}</div>
<div class="li_plan" @click="handleDeleteTask">{{ $t('planMonitor.deleteTask') }}</div>
<div class="li_plan" @click="handleModifyingTask">{{ $t('planMonitor.modifyTask') }}</div>
<div class="li_plan" @click="handleClearData">清除数据</div>
<!-- </ul> -->
</ul>
<ul class="ul-box tool">
@ -22,7 +24,7 @@
</template>
<script>
import { planEffectiveCheck, runPlanNotify } from '@/api/runplan';
import { planEffectiveCheck, clearPlaningData } from '@/api/runplan';
// import { launchFullscreen } from '@/utils/screen';
// import { UrlConfig } from '@/scripts/ConstDic';
@ -90,6 +92,14 @@ export default {
this.$messageBox(this.$t('tip.selectAPlan'));
}
},
handleMovePlanningTrain() {
const serviceNumber = this.$store.state.runPlan.draftSelected.serviceNumber;
if (serviceNumber) {
this.$emit('dispatchDialog', { name: 'movePlaningTrain', params: { serviceNumber } });
} else {
this.$messageBox(this.$t('tip.selectAPlan'));
}
},
//
handleAddTask() {
const params = this.$store.state.runPlan.draftSelected;
@ -108,6 +118,23 @@ export default {
this.$messageBox(this.$t('tip.selectATrain'));
}
},
//
handleClearData() {
this.$confirm('本操作将清除本运行图数据!', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
center: true
}).then(() => {
clearPlaningData(this.loadRunPlanId).then(resp => {
console.log('清除数据成功!');
this.$emit('refresh', this.loadRunPlanId);
}).catch(() => {
this.$message.error('清除数据失败!');
});
}).catch(() => {
console.error('清除数据失败!');
});
},
//
handleModifyingTask() {
const params = this.$store.state.runPlan.draftSelected;

View File

@ -107,8 +107,8 @@ export default {
createRunPlanCommon(this.buildModel()).then(response => {
this.$message.success(this.$t('publish.createCommonSuccess'));
this.$router.go(-1);
}).catch(() => {
this.$messageBox(this.$t('error.createCommonRunPlanFailed'));
}).catch((error) => {
this.$messageBox(error.message);
});
}
});