desc: 调整成都三号现地,行调实训操作

This commit is contained in:
zyy 2019-10-18 18:20:17 +08:00
parent ecef9a4c74
commit 74a2bbb1c6
7 changed files with 287 additions and 353 deletions

View File

@ -22,17 +22,7 @@
</el-row>
<div class="route-table-box">
<span class="route-table-tip">进路列表</span>
<el-table
ref="table"
:data="tempData"
border
:cell-style="tableStyle"
style="width: 99%;"
size="mini"
height="90"
highlight-current-row
@row-click="clickEvent"
>
<el-table ref="table" :data="tempData" border :cell-style="tableStyle" style="width: 99%;" size="mini" height="90" highlight-current-row @row-click="clickEvent">
<el-table-column :id="domIdChoose" prop="name" label="进路" style="margin-left:30px" />
<el-table-column :id="domIdChoose" prop="controlType" label="进路属性" style="margin-left:30px">
<template slot-scope="scope">{{ controlTypeNameMap[scope.row.controlType] }} </template>
@ -78,7 +68,6 @@ export default {
dialogShow: false,
loading: false,
selected: null,
row: null,
operation: '',
display: true,
stationName: '',
@ -163,44 +152,18 @@ export default {
doClose() {
this.loading = false;
this.dialogShow = false;
this.guide();
this.$refs.table.setCurrentRow();
this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected);
},
guide() {
//
if (this.beforeSectionList && this.beforeSectionList.length) {
this.beforeSectionList.forEach(elem => {
elem.cutOff = false;
});
}
this.$store.dispatch('training/updateMapState', [...this.beforeSectionList]);
this.beforeSectionList = [];
},
clickEvent(row, event, column) {
this.row = row;
if (row) {
//
this.guide();
row.canSetting = true;
//
if (row.containSectionList && row.containSectionList.length) {
//
row.containSectionList.forEach(elem => {
elem.cutOff = true;
});
}
this.$store.dispatch('training/updateMapState', [...row.containSectionList]);
this.beforeSectionList = row.containSectionList || [];
//
const operate = {
repeat: true,
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.guide.choose.operation,
val: row.code
val: row.code,
selection: row
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {

View File

@ -14,16 +14,7 @@
</el-col>
</el-row>
<div class="table">
<el-table ref="tempTable" :data="tempData" border style="width: 100%" size="mini" highlight-current-row :height="140">
<el-table-column prop="name" label="选择" width="55" style="margin-left:50px; text-align: right;">
<template slot-scope="scope">
<el-checkbox
v-model="scope.row.check"
style="text-align: center; display: block;"
:disabled="scope.row.disabled"
/>
</template>
</el-table-column>
<el-table ref="tempTable" :data="tempData" border style="width: 100%" size="mini" :highlight-current-row="highlight" :height="140" @row-click="clickEvent">
<el-table-column :id="domIdChoose" prop="name" width="155" label="描述" style="margin-left:30px">
<template slot-scope="scope">
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.name }}</span>
@ -41,7 +32,7 @@
</el-table-column>
<el-table-column :id="domIdChoose" prop="name" label="控制" style="">
<template slot-scope="scope">
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">2222</span>
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.controlType == '01' ? '自动' : '人工' }}</span>
</template>
</el-table-column>
</el-table>
@ -83,7 +74,8 @@ export default {
selection: [],
stationName: '',
signalName: '',
allSelect: false
allSelect: false,
highlight: true
};
},
computed: {
@ -124,15 +116,6 @@ export default {
return disabled;
}
},
watch: {
//
tempData: {
handler(val, oldVal) {
this.checkTableDataSelction(val);
},
deep: true
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
@ -153,20 +136,18 @@ export default {
}
}
// if (tempData && tempData.length > 0) {
// tempData.forEach(elem => {
// elem.check = false;
// elem.disabled = false;
// //
// if (operate.operation === OperationEvent.Signal.humanControl.menu.operation &&
// elem.controlType != '01') {
// elem.disabled = true;
// } if (operate.operation === OperationEvent.Signal.atsAutoControl.menu.operation &&
// elem.controlType == '01') {
// elem.disabled = true;
// }
// });
// }
if (tempData && tempData.length > 0) {
tempData.forEach(elem => {
elem.check = false;
elem.disabled = false;
//
if (operate.operation === OperationEvent.Signal.humanControl.menu.operation && elem.controlType == '01') {
elem.disabled = true;
} if (operate.operation === OperationEvent.Signal.atsAutoControl.menu.operation && elem.controlType == '02') {
elem.disabled = true;
}
});
}
this.tempData = tempData || [];
this.operation = operate.operation;
@ -183,31 +164,6 @@ export default {
this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected);
},
checkTableDataSelction(data) {
const selection = [];
if (data && data.length > 0) {
data.forEach(row => {
if (row.check && !row.disabled) {
selection.push(row);
}
});
}
if (JSON.stringify(selection) !== JSON.stringify(this.selection)) {
this.handleChooseChange(selection);
this.selection = selection;
}
let num = 0;
this.allSelect = false;
this.tempData.forEach(item => {
if (item.check) {
num++;
if (num == this.tempData.length) {
this.allSelect = true;
}
}
});
},
allSelectChange() {
if (this.allSelect) {
this.tempData.forEach(item => {
@ -223,6 +179,7 @@ export default {
});
}
},
// code
serializeCodeListWithSeparator(sep) {
const codeList = [];
if (this.selection && this.selection.length) {
@ -232,17 +189,21 @@ export default {
}
return codeList.join(sep);
},
handleChooseChange(selection) {
this.selection = selection;
if (selection && selection.length) {
clickEvent(row, event, column) {
this.highlight = false;
if (row && !row.disabled) {
this.highlight = true;
this.selection = [row];
this.beforeSectionList = row.containSectionList || [];
//
const operate = {
repeat: true,
type: MapDeviceType.Signal.type,
operation: '',
val: this.serializeCodeListWithSeparator('::'),
selection: selection
val: row.code,
selection: row
};
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
/** 进路交人工控*/
operate.operation = OperationEvent.Signal.humanControl.choose.operation;
@ -256,8 +217,6 @@ export default {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
} else if (!selection) {
this.$messageBox(`请选择一条数据`);
}
},
commit() {

View File

@ -209,6 +209,7 @@ export default {
this.$store.dispatch('menuOperation/setButtonOperation', operation); //
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (operation == this.Signal.humanTrainRoute.button.operation) { //
operate['operateCode'] = this.Signal.humanTrainRoute.button.operation;
this.$refs.password.doShow(operate);
}
this.$store.dispatch('training/emitTipFresh');

View File

@ -867,7 +867,7 @@ export const OperationEvent = {
domId: '_Tips-Signal-Reopen-Confirm'
}
},
// 人解列车进路
// 人解列车进路 (总人解)
humanTrainRoute: {
event: '5',
button: {
@ -950,12 +950,12 @@ export const OperationEvent = {
operation: '3084',
domId: '_Tips-Signal-Guide-Confirm2'
},
stop: {
stop: { // 福州线 关闭弹窗操作
operation: '3085',
domId: '_Tips-Signal-Guide-Stop'
},
choose: {
operation: '3085',
operation: '3086',
domId: '_Tips-Signal-Guide-Choose'
}
},

View File

@ -1289,7 +1289,7 @@ export const OperationList = {
trainingName: '办理进路({3} 进路)',
trainingRemark: '办理进路功能',
trainingType: '02',
productTypes: ['01,02'],
productTypes: ['02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '301', tip: '鼠标右键菜单选择【办理进路】' },
{ deviceType: '04', orderNum: 2, operateCode: '3011', tip: '鼠标左键选择进路名称【{3}】', val: '{4}' },
@ -1304,12 +1304,11 @@ export const OperationList = {
trainingName: '办理引导进路({3})',
trainingRemark: '进路办理信号引导',
trainingType: '02',
productTypes: ['01,02'],
productTypes: ['02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '308', tip: '鼠标右键菜单选择【办理引导进路】' },
{ deviceType: '04', orderNum: 2, operateCode: '3085', tip: '鼠标左键选择进路名称【{3}】' },
{ deviceType: '04', orderNum: 3, operateCode: '308', tip: '鼠标左键点击【确认】按钮' },
{ deviceType: '04', orderNum: 4, operateCode: '0012', tip: '鼠标左键点击【确认】按钮' }
{ deviceType: '04', orderNum: 2, operateCode: '3086', tip: '鼠标左键选择进路名称【{3}】', val: '{4}' }, // 进路编号值不正确
{ deviceType: '04', orderNum: 3, operateCode: '308', tip: '鼠标左键点击【确认】按钮' }
]
},
{
@ -1320,7 +1319,7 @@ export const OperationList = {
trainingName: '取消进路({3} 进路)',
trainingRemark: '取消进路功能',
trainingType: '02',
productTypes: ['01,02'],
productTypes: ['02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '303', tip: '鼠标右键菜单选择【取消进路】' },
{ deviceType: '04', orderNum: 2, operateCode: '303', tip: '鼠标左键点击【确定】按钮' }
@ -1329,12 +1328,12 @@ export const OperationList = {
{
maxDuration: 15,
minDuration: 8,
operateType: '0207',
operateType: '0215', // 新增数据字典code
skinCode: '04',
trainingName: '总人解({3})',
trainingRemark: '总人解',
trainingType: '02',
productTypes: ['01,02'],
productTypes: ['02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '305', tip: '鼠标右键菜单选择【总人解】' },
{ deviceType: '04', orderNum: 2, operateCode: '305', tip: '鼠标左键点击【确定】按钮' },
@ -1349,7 +1348,7 @@ export const OperationList = {
trainingName: '信号重开({3} 进路)',
trainingRemark: '信号重开功能',
trainingType: '02',
productTypes: ['01,02'],
productTypes: ['02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '304', tip: '鼠标右键菜单选择【信号重开】' },
{ deviceType: '04', orderNum: 2, operateCode: '304', tip: '鼠标左键点击【确定】按钮' }
@ -1363,7 +1362,7 @@ export const OperationList = {
trainingName: '信号封锁({5})',
trainingRemark: '信号封闭',
trainingType: '02',
productTypes: ['01,02'],
productTypes: ['02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '306', tip: '鼠标右键菜单选择【信号封闭】' },
{ deviceType: '04', orderNum: 2, operateCode: '306', tip: '鼠标左键点击【确定】按钮' },
@ -1378,7 +1377,7 @@ export const OperationList = {
trainingName: '信号解封({5})',
trainingRemark: '信号解封',
trainingType: '02',
productTypes: ['01,02'],
productTypes: ['02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '307', tip: '鼠标右键菜单选择【信号解封】' },
{ deviceType: '04', orderNum: 2, operateCode: '307', tip: '鼠标左键点击【确认】按钮' },
@ -1393,7 +1392,7 @@ export const OperationList = {
trainingName: '进路收人工控({5})',
trainingRemark: '进路收人工控',
trainingType: '02',
productTypes: ['01,02'],
productTypes: ['02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '314', tip: '鼠标右键菜单选择【进路收人工控】' },
{ deviceType: '04', orderNum: 2, operateCode: '3141', tip: '鼠标左键选择进路名称【{3}】', val: '{4}' },
@ -1408,7 +1407,7 @@ export const OperationList = {
trainingName: '进路交自动控({5})',
trainingRemark: '进路交自动控',
trainingType: '02',
productTypes: ['01,02'],
productTypes: ['02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '315', tip: '鼠标右键菜单选择【进路交自动控】' },
{ deviceType: '04', orderNum: 2, operateCode: '3151', tip: '鼠标左键选择进路名称【{3}】', val: '{4}' },
@ -1433,12 +1432,12 @@ export const OperationList = {
{
maxDuration: 15,
minDuration: 8,
operateType: '0305',
operateType: '0305', // 0312 新增定位字典
skinCode: '04',
trainingName: '单操到定位({7})',
trainingRemark: '单操到定位({15})',
trainingType: '03',
productTypes: ['01,02'],
productTypes: ['02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '101', tip: '鼠标右键菜单选择【单操到定位】' },
{ deviceType: '02', orderNum: 2, operateCode: '101', tip: '鼠标左键点击【确定】按钮' }
@ -1447,12 +1446,12 @@ export const OperationList = {
{
maxDuration: 15,
minDuration: 8,
operateType: '0305',
operateType: '0305', // 0313 新增定位字典
skinCode: '04',
trainingName: '单操到反位({7})',
trainingRemark: '单操到反位({7})',
trainingType: '03',
productTypes: ['01,02'],
productTypes: ['02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '102', tip: '鼠标右键菜单选择【单操到反位】' },
{ deviceType: '02', orderNum: 2, operateCode: '102', tip: '鼠标左键点击【确定】按钮' }
@ -1466,12 +1465,26 @@ export const OperationList = {
trainingName: '道岔单锁({7})',
trainingRemark: '道岔单锁功能',
trainingType: '03',
productTypes: ['01,02'],
productTypes: ['02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '103', tip: '鼠标右键菜单选择【道岔单锁】' },
{ deviceType: '02', orderNum: 2, operateCode: '103', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0301',
skinCode: '04',
trainingName: '道岔单锁({7})',
trainingRemark: '道岔单锁功能',
trainingType: '03',
productTypes: ['01'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '1030', tip: '鼠标左键菜单选择【道岔单锁】' },
{ deviceType: '02', orderNum: 2, operateCode: '1030', tip: '鼠标左键点击【{{7}}】', val: '{8}' }
]
},
{
maxDuration: 15,
minDuration: 8,
@ -1480,7 +1493,7 @@ export const OperationList = {
trainingName: '道岔解锁({7})',
trainingRemark: '道岔解锁功能',
trainingType: '03',
productTypes: ['01,02'],
productTypes: ['02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '104', tip: '鼠标右键菜单选择【道岔解锁】' },
{ deviceType: '02', orderNum: 5, operateCode: '104', tip: '鼠标左键点击【确定】按钮' }
@ -1494,7 +1507,7 @@ export const OperationList = {
trainingName: '道岔封锁({7})',
trainingRemark: '道岔封锁功能',
trainingType: '03',
productTypes: ['01,02'],
productTypes: ['02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '105', tip: '鼠标右键菜单选择【道岔封锁】' },
{ deviceType: '02', orderNum: 2, operateCode: '105', tip: '鼠标左键点击【确定】按钮' },
@ -1509,7 +1522,7 @@ export const OperationList = {
trainingName: '道岔解封({7})',
trainingRemark: '道岔解封功能',
trainingType: '03',
productTypes: ['01,02'],
productTypes: ['02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '106', tip: '鼠标右键菜单选择【道岔解封】' },
{ deviceType: '02', orderNum: 2, operateCode: '106', tip: '鼠标左键点击【确认】按钮' },
@ -1540,7 +1553,7 @@ export const OperationList = {
trainingName: '区故解({8}{9})',
trainingRemark: '故障解锁功能',
trainingType: '04',
productTypes: ['01,02'],
productTypes: ['02'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '402', tip: '鼠标右键菜单选择【区故解】' },
{ deviceType: '03', orderNum: 2, operateCode: '402', tip: '鼠标左键点击【确认】按钮' },
@ -1548,7 +1561,7 @@ export const OperationList = {
]
},
{
maxDuration: 15,
maxDuration: 15, // 自动生成实训失败
minDuration: 8,
operateType: '0409',
skinCode: '04',
@ -1728,7 +1741,7 @@ export const OperationList = {
]
},
{
maxDuration: 8,
maxDuration: 8, // 自动生成实训失败
minDuration: 5,
operateType: '0507',
skinCode: '04',
@ -1738,7 +1751,7 @@ export const OperationList = {
productTypes: ['02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '507', tip: '鼠标右键菜单选择【属性】' },
{ deviceType: '06', orderNum: 2, operateCode: '0012', tip: '鼠标左键点击【确定】按钮' }
{ deviceType: '06', orderNum: 2, operateCode: '0012', tip: '鼠标左键点击【退出】按钮' }
]
}
]

View File

@ -6,7 +6,7 @@ const TrainType = MapDeviceType.Train.type;
export default {
test: function (operates) {
let operateType = getOperateTypeBy('Train', operates[0].operation);
const operateType = getOperateTypeBy('Train', operates[0].operation);
if (operateType) {
return true;
} else {
@ -15,7 +15,7 @@ export default {
},
convert: function (operates) {
if (operates && operates.length) {
let operation = operates[0].operation;
const operation = operates[0].operation;
switch (operation) {
case TrainOperation.cancelStoppage.menu.operation: return handleMenuCancelStopPage(operates);
@ -54,7 +54,7 @@ export default {
*/
function handleMenuCancelStopPage(operates) {
if (operates.length >= 1) {
let operate = operates[0];
const operate = operates[0];
if (operate.type === TrainType && operate.code) {
return {
type: operate.type,
@ -74,7 +74,7 @@ function handleMenuCancelStopPage(operates) {
*/
function handleMenuStoppage(operates) {
if (operates.length >= 1) {
let operate = operates[0];
const operate = operates[0];
if (operate.type === TrainType && operate.code) {
return {
type: operate.type,
@ -88,21 +88,20 @@ function handleMenuStoppage(operates) {
return null;
}
/**
* 处理右键菜单 添加列车识别号 操作
* @param {*} operates
*/
function handleMenuAddTrainId(operates) {
if (operates.length >= 1) {
let operate = operates[operates.length - 1];
const operate = operates[operates.length - 1];
if (operate.type === TrainType && operate.val) {
return {
type: operate.type,
code: operates[0].code,
over: true,
operation: TrainOperation.addTrainId.event,
val: operate.val,
val: operate.val
};
}
return { error: true };
@ -116,7 +115,7 @@ function handleMenuAddTrainId(operates) {
*/
function handleMenuEditTrainId(operates) {
if (operates.length >= 1) {
let operate = operates[operates.length - 1];
const operate = operates[operates.length - 1];
if (operate.type === TrainType && operate.val) {
return {
type: operate.type,
@ -137,7 +136,7 @@ function handleMenuEditTrainId(operates) {
*/
function handleMenuDelTrainId(operates) {
if (operates.length >= 1) {
let operate = operates[operates.length - 1];
const operate = operates[operates.length - 1];
if (operate.type === TrainType && operate.val) {
return {
type: operate.type,
@ -158,7 +157,7 @@ function handleMenuDelTrainId(operates) {
*/
function handleMenuMoveTrainId(operates) {
if (operates.length >= 1) {
let operate = operates[operates.length - 1];
const operate = operates[operates.length - 1];
if (operate.type === TrainType && operate.val) {
return {
type: operate.type,
@ -179,7 +178,7 @@ function handleMenuMoveTrainId(operates) {
*/
function handleMenuSwitchTrainId(operates) {
if (operates.length >= 1) {
let operate = operates[operates.length - 1];
const operate = operates[operates.length - 1];
if (operate.type === TrainType && operate.val) {
return {
type: operate.type,
@ -200,7 +199,7 @@ function handleMenuSwitchTrainId(operates) {
*/
function handleMenuEditTrainNo(operates) {
if (operates.length >= 1) {
let operate = operates[operates.length - 1];
const operate = operates[operates.length - 1];
if (operate.type === TrainType && operate.val) {
return {
type: operate.type,
@ -222,13 +221,13 @@ function handleMenuEditTrainNo(operates) {
function handleMenuLimitSpeed(operates) {
if (operates.length > 0) {
let operate = operates[0];
const operate = operates[0];
if (operate.type === TrainType && operate.code) {
return {
type: operate.type,
code: operate.code,
over: true,
operation: TrainOperation.limitSpeed.event,
operation: TrainOperation.limitSpeed.event
};
}
return { error: true };
@ -236,7 +235,6 @@ function handleMenuLimitSpeed(operates) {
return null;
}
/**
* 处理右键菜单 设置计划车
* @param {*} operates
@ -244,13 +242,13 @@ function handleMenuLimitSpeed(operates) {
function handleMenuSetPlanTrainId(operates) {
if (operates.length > 0) {
let operate = operates[0];
const operate = operates[0];
if (operate.type === TrainType && operate.code) {
return {
type: operate.type,
code: operate.code,
over: true,
operation: TrainOperation.setPlanTrainId.event,
operation: TrainOperation.setPlanTrainId.event
};
}
return { error: true };
@ -260,13 +258,13 @@ function handleMenuSetPlanTrainId(operates) {
function handleMenuAddPlanTrainId(operates) {
if (operates.length > 0) {
let operate = operates[0];
const operate = operates[0];
if (operate.type === TrainType && operate.code) {
return {
type: operate.type,
code: operate.code,
over: true,
operation: TrainOperation.addPlanTrainId.event,
operation: TrainOperation.addPlanTrainId.event
};
}
return { error: true };
@ -276,13 +274,13 @@ function handleMenuAddPlanTrainId(operates) {
function handleMenuMoveEventlyTrainId(operates) {
if (operates.length > 0) {
let operate = operates[0];
const operate = operates[0];
if (operate.type === TrainType && operate.code) {
return {
type: operate.type,
code: operate.code,
over: true,
operation: TrainOperation.moveEventlyTrainId.event,
operation: TrainOperation.moveEventlyTrainId.event
};
}
return { error: true };
@ -291,13 +289,13 @@ function handleMenuMoveEventlyTrainId(operates) {
}
function handleMenuDeletePlanTrainId(operates) {
if (operates.length > 0) {
let operate = operates[0];
const operate = operates[0];
if (operate.type === TrainType && operate.code) {
return {
type: operate.type,
code: operate.code,
over: true,
operation: TrainOperation.deletePlanTrainId.event,
operation: TrainOperation.deletePlanTrainId.event
};
}
return { error: true };

View File

@ -3,8 +3,8 @@ export function getBaseUrl() {
let BASE_API;
if (process.env.NODE_ENV === 'development') {
// BASE_API = 'https://joylink.club/jlcloud';
BASE_API = 'https://test.joylink.club/jlcloud';
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪
// BASE_API = 'https://test.joylink.club/jlcloud';
BASE_API = 'http://192.168.3.5:9000'; // 袁琪
// BASE_API = 'http://192.168.3.6:9000'; // 旭强
// BASE_API = 'http://192.168.3.41:9000'; // 王兴杰
} else {