代码调整
This commit is contained in:
parent
052b1c3688
commit
8eee00f454
@ -44,8 +44,8 @@
|
|||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
export default {
|
export default {
|
||||||
list: [
|
list: [
|
||||||
// 控制模式
|
// 控制模式
|
||||||
{
|
{
|
||||||
maxDuration: 15,
|
maxDuration: 15,
|
||||||
minDuration: 8,
|
minDuration: 8,
|
||||||
operateType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL.value,
|
operateType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL.value,
|
||||||
@ -55,11 +55,11 @@ export default {
|
|||||||
trainingType: 'ControlConvertMenu',
|
trainingType: 'ControlConvertMenu',
|
||||||
productTypes: ['01'],
|
productTypes: ['01'],
|
||||||
stepVOList: [
|
stepVOList: [
|
||||||
{ deviceType: '04', orderNum: 1, operateCode: '2993', tip: '鼠标左键点击【功能按钮】' },
|
{ deviceType: '04', orderNum: 1, operateCode: '2993', tip: '鼠标左键点击【功能按钮】' },
|
||||||
{ deviceType: '04', orderNum: 2, operateCode: '2993', tip: '鼠标左键点击【站控】', codeType:'STATION', subType:'substation' }
|
{ deviceType: '04', orderNum: 2, operateCode: '2993', tip: '鼠标左键点击【站控】', codeType:'STATION', subType:'substation' }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
maxDuration: 15,
|
maxDuration: 15,
|
||||||
minDuration: 8,
|
minDuration: 8,
|
||||||
operateType: CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL.value,
|
operateType: CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL.value,
|
||||||
@ -70,10 +70,10 @@ export default {
|
|||||||
productTypes: ['01'],
|
productTypes: ['01'],
|
||||||
stepVOList: [
|
stepVOList: [
|
||||||
{ deviceType: '04', orderNum: 1, operateCode: '2993', tip: '鼠标左键点击【功能按钮】' },
|
{ deviceType: '04', orderNum: 1, operateCode: '2993', tip: '鼠标左键点击【功能按钮】' },
|
||||||
{ deviceType: '04', orderNum: 2, operateCode: '2993', tip: '鼠标左键点击【紧急站控】', codeType:'STATION', subType:'emergency' }
|
{ deviceType: '04', orderNum: 2, operateCode: '2993', tip: '鼠标左键点击【紧急站控】', codeType:'STATION', subType:'emergency' }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
maxDuration: 15,
|
maxDuration: 15,
|
||||||
minDuration: 8,
|
minDuration: 8,
|
||||||
operateType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_CENTER_CONTROL.value,
|
operateType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_CENTER_CONTROL.value,
|
||||||
@ -84,9 +84,9 @@ export default {
|
|||||||
productTypes: ['01'],
|
productTypes: ['01'],
|
||||||
stepVOList: [
|
stepVOList: [
|
||||||
{ deviceType: '04', orderNum: 1, operateCode: '2993', tip: '鼠标左键点击【功能按钮】' },
|
{ deviceType: '04', orderNum: 1, operateCode: '2993', tip: '鼠标左键点击【功能按钮】' },
|
||||||
{ deviceType: '04', orderNum: 2, operateCode: '2993', tip: '鼠标左键点击【中控】', codeType:'STATION', subType:'center' }
|
{ deviceType: '04', orderNum: 2, operateCode: '2993', tip: '鼠标左键点击【中控】', codeType:'STATION', subType:'center' }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
// 信号机列表
|
// 信号机列表
|
||||||
{
|
{
|
||||||
maxDuration: 15,
|
maxDuration: 15,
|
||||||
@ -114,11 +114,11 @@ export default {
|
|||||||
trainingType: 'Signal',
|
trainingType: 'Signal',
|
||||||
productTypes: ['01'],
|
productTypes: ['01'],
|
||||||
stepVOList: [
|
stepVOList: [
|
||||||
{ deviceType: '04', orderNum: 1, operateCode: '3010', tip: '鼠标左键点击【排列进路】' },
|
{ deviceType: '04', orderNum: 1, operateCode: '3010', tip: '鼠标左键点击【排列进路】' },
|
||||||
{ deviceType: '04', orderNum: 2, operateCode: '3010', tip: '鼠标左键点击【{5}】', codeType:'START_SIGNAL' },
|
{ deviceType: '04', orderNum: 2, operateCode: '3010', tip: '鼠标左键点击【{5}】', codeType:'START_SIGNAL' },
|
||||||
{ deviceType: '04', orderNum: 3, operateCode: '3010', tip: '鼠标左键点击【{5}】', codeType:'END_SIGNAL' }
|
{ deviceType: '04', orderNum: 3, operateCode: '3010', tip: '鼠标左键点击【{5}】', codeType:'END_SIGNAL' }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
maxDuration: 15,
|
maxDuration: 15,
|
||||||
@ -151,8 +151,8 @@ export default {
|
|||||||
{ deviceType: '04', orderNum: 3, operateCode: '0011', tip: '输入密码123,点击【确定】按钮' },
|
{ deviceType: '04', orderNum: 3, operateCode: '0011', tip: '输入密码123,点击【确定】按钮' },
|
||||||
{ deviceType: '04', orderNum: 4, operateCode: '3080', tip: '鼠标左键点击【{5}】', codeType:'END_SIGNAL' }
|
{ deviceType: '04', orderNum: 4, operateCode: '3080', tip: '鼠标左键点击【{5}】', codeType:'END_SIGNAL' }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
// maxDuration: 15,
|
// maxDuration: 15,
|
||||||
// minDuration: 8,
|
// minDuration: 8,
|
||||||
// operateType: CMD.Signal.CMD_STATION_SET_MASTER_GUIDE_LOCK.value,
|
// operateType: CMD.Signal.CMD_STATION_SET_MASTER_GUIDE_LOCK.value,
|
||||||
@ -317,7 +317,7 @@ export default {
|
|||||||
minDuration: 8,
|
minDuration: 8,
|
||||||
operateType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING.value,
|
operateType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING.value,
|
||||||
skinCode: '04',
|
skinCode: '04',
|
||||||
trainingName: '进路收人工控({5})',
|
trainingName: '进路收人工控({3})',
|
||||||
trainingRemark: '进路收人工控',
|
trainingRemark: '进路收人工控',
|
||||||
trainingType: 'Signal',
|
trainingType: 'Signal',
|
||||||
productTypes: ['02'],
|
productTypes: ['02'],
|
||||||
@ -338,7 +338,7 @@ export default {
|
|||||||
productTypes: ['01'],
|
productTypes: ['01'],
|
||||||
stepVOList: [
|
stepVOList: [
|
||||||
{ deviceType: '04', orderNum: 1, operateCode: '3140', tip: '鼠标左键点击【人工控】' },
|
{ deviceType: '04', orderNum: 1, operateCode: '3140', tip: '鼠标左键点击【人工控】' },
|
||||||
{ deviceType: '04', orderNum: 2, operateCode: '3140', tip: '鼠标左键点击【{3}】', codeType:'SIGNAL' }
|
{ deviceType: '04', orderNum: 2, operateCode: '3140', tip: '鼠标左键点击【{5}】', codeType:'SIGNAL' }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -346,7 +346,7 @@ export default {
|
|||||||
minDuration: 8,
|
minDuration: 8,
|
||||||
operateType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING.value,
|
operateType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING.value,
|
||||||
skinCode: '04',
|
skinCode: '04',
|
||||||
trainingName: '进路交自动控({5})',
|
trainingName: '进路交自动控({3})',
|
||||||
trainingRemark: '进路交自动控',
|
trainingRemark: '进路交自动控',
|
||||||
trainingType: 'Signal',
|
trainingType: 'Signal',
|
||||||
productTypes: ['02'],
|
productTypes: ['02'],
|
||||||
@ -367,7 +367,7 @@ export default {
|
|||||||
productTypes: ['01'],
|
productTypes: ['01'],
|
||||||
stepVOList: [
|
stepVOList: [
|
||||||
{ deviceType: '04', orderNum: 1, operateCode: '3150', tip: '鼠标左键点击【自动控】' },
|
{ deviceType: '04', orderNum: 1, operateCode: '3150', tip: '鼠标左键点击【自动控】' },
|
||||||
{ deviceType: '04', orderNum: 2, operateCode: '3150', tip: '鼠标左键点击【{3}】', codeType:'SIGNAL' }
|
{ deviceType: '04', orderNum: 2, operateCode: '3150', tip: '鼠标左键点击【{5}】', codeType:'SIGNAL' }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -660,8 +660,8 @@ export default {
|
|||||||
{ deviceType: '06', orderNum: 2, operateCode: '5051', tip: '鼠标左键点击【上行全线】按钮', val: '02' },
|
{ deviceType: '06', orderNum: 2, operateCode: '5051', tip: '鼠标左键点击【上行全线】按钮', val: '02' },
|
||||||
{ deviceType: '06', orderNum: 3, operateCode: '508', tip: '鼠标左键点击【确定】按钮' }
|
{ deviceType: '06', orderNum: 3, operateCode: '508', tip: '鼠标左键点击【确定】按钮' }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
maxDuration: 15,
|
maxDuration: 15,
|
||||||
minDuration: 8,
|
minDuration: 8,
|
||||||
operateType: CMD.Stand.CMD_STAND_SET_JUMP_STOP.value,
|
operateType: CMD.Stand.CMD_STAND_SET_JUMP_STOP.value,
|
||||||
@ -688,8 +688,8 @@ export default {
|
|||||||
{ deviceType: '06', orderNum: 1, operateCode: '502', tip: '鼠标右键菜单选择【跳停】' },
|
{ deviceType: '06', orderNum: 1, operateCode: '502', tip: '鼠标右键菜单选择【跳停】' },
|
||||||
{ deviceType: '06', orderNum: 2, operateCode: '502', tip: '鼠标左键点击【确定】按钮' }
|
{ deviceType: '06', orderNum: 2, operateCode: '502', tip: '鼠标左键点击【确定】按钮' }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
maxDuration: 15,
|
maxDuration: 15,
|
||||||
minDuration: 8,
|
minDuration: 8,
|
||||||
operateType: CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP.value,
|
operateType: CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP.value,
|
||||||
@ -716,7 +716,7 @@ export default {
|
|||||||
{ deviceType: '06', orderNum: 1, operateCode: '503', tip: '鼠标右键菜单选择【取消跳停】' },
|
{ deviceType: '06', orderNum: 1, operateCode: '503', tip: '鼠标右键菜单选择【取消跳停】' },
|
||||||
{ deviceType: '06', orderNum: 2, operateCode: '503', tip: '鼠标左键点击【确定】按钮' }
|
{ deviceType: '06', orderNum: 2, operateCode: '503', tip: '鼠标左键点击【确定】按钮' }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
maxDuration: 15,
|
maxDuration: 15,
|
||||||
minDuration: 8,
|
minDuration: 8,
|
||||||
|
@ -182,8 +182,8 @@ export default {
|
|||||||
initMenu() {
|
initMenu() {
|
||||||
// 编辑模式菜单列表
|
// 编辑模式菜单列表
|
||||||
if (this.selected.type != '04') {
|
if (this.selected.type != '04') {
|
||||||
// this.menu = this.menuNormal.Center;
|
// this.menu = this.menuNormal.Center;
|
||||||
this.menu = MenuContextHandler.covert2(this.menuNormal);
|
this.menu = MenuContextHandler.covert2(this.menuNormal);
|
||||||
} else {
|
} else {
|
||||||
this.menu = [];
|
this.menu = [];
|
||||||
}
|
}
|
||||||
|
@ -60,8 +60,8 @@ class MenuContextHandler {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
covert2(menuList) {
|
covert2(menuList) {
|
||||||
const selected = this.getCurrentStateObject();
|
const selected = this.getCurrentStateObject();
|
||||||
let menu = [];
|
let menu = [];
|
||||||
const control = this.getStationControl(selected);
|
const control = this.getStationControl(selected);
|
||||||
if (control && !store.state.scriptRecord.audioPlay) {
|
if (control && !store.state.scriptRecord.audioPlay) {
|
||||||
@ -77,10 +77,21 @@ class MenuContextHandler {
|
|||||||
menu = [];
|
menu = [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (menu.constructor === Array) {
|
||||||
|
menu.forEach(elem => {
|
||||||
|
if (elem.children && elem.children.length > 0) {
|
||||||
|
elem.children.forEach(each=>{
|
||||||
|
this.covertEachCommand(each, type, selected, status, false);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.covertEachCommand(elem, type, selected, status, false);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return menu;
|
return menu;
|
||||||
}
|
}
|
||||||
|
|
||||||
covert(menuList) {
|
covert(menuList) {
|
||||||
const selected = this.getCurrentStateObject();
|
const selected = this.getCurrentStateObject();
|
||||||
@ -115,7 +126,7 @@ class MenuContextHandler {
|
|||||||
return menu;
|
return menu;
|
||||||
}
|
}
|
||||||
|
|
||||||
covertEachCommand(elem, type, selected, status) {
|
covertEachCommand(elem, type, selected, status, isSettingCommand = true) {
|
||||||
if (elem.type === 'separator') {
|
if (elem.type === 'separator') {
|
||||||
elem.show = true;
|
elem.show = true;
|
||||||
return;
|
return;
|
||||||
@ -132,7 +143,9 @@ class MenuContextHandler {
|
|||||||
elem.disabled = true;
|
elem.disabled = true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
elem.show = false;
|
if (isSettingCommand) {
|
||||||
|
elem.show = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -461,7 +461,6 @@ export default {
|
|||||||
this.$refs['dataform'].validate((valid) => {
|
this.$refs['dataform'].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
const data = Object.assign({_type: this.editModel.type}, this.editModel);
|
const data = Object.assign({_type: this.editModel.type}, this.editModel);
|
||||||
console.log(data, '=====');
|
|
||||||
this.$emit('updateMapModel', data);
|
this.$emit('updateMapModel', data);
|
||||||
this.field = '';
|
this.field = '';
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user