Merge branch 'dev' of https://git.qcloud.com/joylink/jl-nclient into dev
This commit is contained in:
commit
94288eaecc
@ -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 }) => {
|
||||
|
@ -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() {
|
||||
|
@ -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');
|
||||
|
@ -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'
|
||||
}
|
||||
},
|
||||
|
@ -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: '鼠标左键点击【退出】按钮' }
|
||||
]
|
||||
}
|
||||
]
|
||||
|
@ -5,214 +5,213 @@ const TrainOperation = OperationEvent.Train;
|
||||
const TrainType = MapDeviceType.Train.type;
|
||||
|
||||
export default {
|
||||
test: function (operates) {
|
||||
let operateType = getOperateTypeBy('Train', operates[0].operation);
|
||||
if (operateType) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
convert: function (operates) {
|
||||
if (operates && operates.length) {
|
||||
let operation = operates[0].operation;
|
||||
switch (operation) {
|
||||
case TrainOperation.cancelStoppage.menu.operation: return handleMenuCancelStopPage(operates);
|
||||
test: function (operates) {
|
||||
const operateType = getOperateTypeBy('Train', operates[0].operation);
|
||||
if (operateType) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
convert: function (operates) {
|
||||
if (operates && operates.length) {
|
||||
const operation = operates[0].operation;
|
||||
switch (operation) {
|
||||
case TrainOperation.cancelStoppage.menu.operation: return handleMenuCancelStopPage(operates);
|
||||
|
||||
case TrainOperation.stoppage.menu.operation: return handleMenuStoppage(operates);
|
||||
case TrainOperation.stoppage.menu.operation: return handleMenuStoppage(operates);
|
||||
|
||||
case TrainOperation.addTrainId.menu.operation: return handleMenuAddTrainId(operates);
|
||||
case TrainOperation.addTrainId.menu.operation: return handleMenuAddTrainId(operates);
|
||||
|
||||
case TrainOperation.editTrainId.menu.operation: return handleMenuEditTrainId(operates);
|
||||
case TrainOperation.editTrainId.menu.operation: return handleMenuEditTrainId(operates);
|
||||
|
||||
case TrainOperation.delTrainId.menu.operation: return handleMenuDelTrainId(operates);
|
||||
case TrainOperation.delTrainId.menu.operation: return handleMenuDelTrainId(operates);
|
||||
|
||||
case TrainOperation.moveTrainId.menu.operation: return handleMenuMoveTrainId(operates);
|
||||
case TrainOperation.moveTrainId.menu.operation: return handleMenuMoveTrainId(operates);
|
||||
|
||||
case TrainOperation.switchTrainId.menu.operation: return handleMenuSwitchTrainId(operates);
|
||||
case TrainOperation.switchTrainId.menu.operation: return handleMenuSwitchTrainId(operates);
|
||||
|
||||
case TrainOperation.editTrainNo.menu.operation: return handleMenuEditTrainNo(operates);
|
||||
case TrainOperation.editTrainNo.menu.operation: return handleMenuEditTrainNo(operates);
|
||||
|
||||
case TrainOperation.limitSpeed.menu.operation: return handleMenuLimitSpeed(operates);
|
||||
case TrainOperation.limitSpeed.menu.operation: return handleMenuLimitSpeed(operates);
|
||||
|
||||
case TrainOperation.setPlanTrainId.menu.operation: return handleMenuSetPlanTrainId(operates);
|
||||
case TrainOperation.setPlanTrainId.menu.operation: return handleMenuSetPlanTrainId(operates);
|
||||
|
||||
case TrainOperation.addPlanTrainId.menu.operation: return handleMenuAddPlanTrainId(operates);
|
||||
case TrainOperation.addPlanTrainId.menu.operation: return handleMenuAddPlanTrainId(operates);
|
||||
|
||||
case TrainOperation.moveEventlyTrainId.menu.operation: return handleMenuMoveEventlyTrainId(operates);
|
||||
case TrainOperation.moveEventlyTrainId.menu.operation: return handleMenuMoveEventlyTrainId(operates);
|
||||
|
||||
case TrainOperation.deletePlanTrainId.menu.operation: return handleMenuDeletePlanTrainId(operates);
|
||||
case TrainOperation.deletePlanTrainId.menu.operation: return handleMenuDeletePlanTrainId(operates);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* 处理右键菜单 取消故障 操作
|
||||
* @param {*} operates
|
||||
* @param {*} operates
|
||||
*/
|
||||
function handleMenuCancelStopPage(operates) {
|
||||
if (operates.length >= 1) {
|
||||
let operate = operates[0];
|
||||
if (operate.type === TrainType && operate.code) {
|
||||
return {
|
||||
type: operate.type,
|
||||
code: operate.code,
|
||||
over: true,
|
||||
operation: TrainOperation.cancelStoppage.event
|
||||
};
|
||||
}
|
||||
return { error: true };
|
||||
}
|
||||
return null;
|
||||
if (operates.length >= 1) {
|
||||
const operate = operates[0];
|
||||
if (operate.type === TrainType && operate.code) {
|
||||
return {
|
||||
type: operate.type,
|
||||
code: operate.code,
|
||||
over: true,
|
||||
operation: TrainOperation.cancelStoppage.event
|
||||
};
|
||||
}
|
||||
return { error: true };
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理右键菜单 设置故障 操作
|
||||
* @param {*} operates
|
||||
* @param {*} operates
|
||||
*/
|
||||
function handleMenuStoppage(operates) {
|
||||
if (operates.length >= 1) {
|
||||
let operate = operates[0];
|
||||
if (operate.type === TrainType && operate.code) {
|
||||
return {
|
||||
type: operate.type,
|
||||
code: operate.code,
|
||||
over: true,
|
||||
operation: TrainOperation.stoppage.event
|
||||
};
|
||||
}
|
||||
return { error: true };
|
||||
}
|
||||
return null;
|
||||
if (operates.length >= 1) {
|
||||
const operate = operates[0];
|
||||
if (operate.type === TrainType && operate.code) {
|
||||
return {
|
||||
type: operate.type,
|
||||
code: operate.code,
|
||||
over: true,
|
||||
operation: TrainOperation.stoppage.event
|
||||
};
|
||||
}
|
||||
return { error: true };
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 处理右键菜单 添加列车识别号 操作
|
||||
* @param {*} operates
|
||||
* @param {*} operates
|
||||
*/
|
||||
function handleMenuAddTrainId(operates) {
|
||||
if (operates.length >= 1) {
|
||||
let 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,
|
||||
};
|
||||
}
|
||||
return { error: true };
|
||||
}
|
||||
return null;
|
||||
if (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
|
||||
};
|
||||
}
|
||||
return { error: true };
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理右键菜单 修改列车识别号 操作
|
||||
* @param {*} operates
|
||||
* @param {*} operates
|
||||
*/
|
||||
function handleMenuEditTrainId(operates) {
|
||||
if (operates.length >= 1) {
|
||||
let operate = operates[operates.length - 1];
|
||||
if (operate.type === TrainType && operate.val) {
|
||||
return {
|
||||
type: operate.type,
|
||||
code: operates[0].code,
|
||||
over: true,
|
||||
operation: TrainOperation.editTrainId.event,
|
||||
val: operate.val
|
||||
};
|
||||
}
|
||||
return { error: true };
|
||||
}
|
||||
return null;
|
||||
if (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.editTrainId.event,
|
||||
val: operate.val
|
||||
};
|
||||
}
|
||||
return { error: true };
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理右键菜单 删除列车识别号 操作
|
||||
* @param {*} operates
|
||||
* @param {*} operates
|
||||
*/
|
||||
function handleMenuDelTrainId(operates) {
|
||||
if (operates.length >= 1) {
|
||||
let operate = operates[operates.length - 1];
|
||||
if (operate.type === TrainType && operate.val) {
|
||||
return {
|
||||
type: operate.type,
|
||||
code: operates[0].code,
|
||||
over: true,
|
||||
operation: TrainOperation.delTrainId.event,
|
||||
val: operate.val
|
||||
};
|
||||
}
|
||||
return { error: true };
|
||||
}
|
||||
return null;
|
||||
if (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.delTrainId.event,
|
||||
val: operate.val
|
||||
};
|
||||
}
|
||||
return { error: true };
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理右键菜单 移动列车识别号 操作
|
||||
* @param {*} operates
|
||||
* @param {*} operates
|
||||
*/
|
||||
function handleMenuMoveTrainId(operates) {
|
||||
if (operates.length >= 1) {
|
||||
let operate = operates[operates.length - 1];
|
||||
if (operate.type === TrainType && operate.val) {
|
||||
return {
|
||||
type: operate.type,
|
||||
code: operates[0].code,
|
||||
over: true,
|
||||
operation: TrainOperation.moveTrainId.event,
|
||||
val: operate.val
|
||||
};
|
||||
}
|
||||
return { error: true };
|
||||
}
|
||||
return null;
|
||||
if (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.moveTrainId.event,
|
||||
val: operate.val
|
||||
};
|
||||
}
|
||||
return { error: true };
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理右键菜单 交换列车识别号 操作
|
||||
* @param {*} operates
|
||||
* @param {*} operates
|
||||
*/
|
||||
function handleMenuSwitchTrainId(operates) {
|
||||
if (operates.length >= 1) {
|
||||
let operate = operates[operates.length - 1];
|
||||
if (operate.type === TrainType && operate.val) {
|
||||
return {
|
||||
type: operate.type,
|
||||
code: operates[0].code,
|
||||
over: true,
|
||||
operation: TrainOperation.switchTrainId.event,
|
||||
val: operate.val
|
||||
};
|
||||
}
|
||||
return { error: true };
|
||||
}
|
||||
return null;
|
||||
if (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.switchTrainId.event,
|
||||
val: operate.val
|
||||
};
|
||||
}
|
||||
return { error: true };
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理右键菜单 修改车组号 操作
|
||||
* @param {*} operates
|
||||
* @param {*} operates
|
||||
*/
|
||||
function handleMenuEditTrainNo(operates) {
|
||||
if (operates.length >= 1) {
|
||||
let operate = operates[operates.length - 1];
|
||||
if (operate.type === TrainType && operate.val) {
|
||||
return {
|
||||
type: operate.type,
|
||||
code: operate[0].code,
|
||||
over: true,
|
||||
operation: TrainOperation.editTrainNo.event,
|
||||
val: operate.val
|
||||
};
|
||||
}
|
||||
return { error: true };
|
||||
}
|
||||
return null;
|
||||
if (operates.length >= 1) {
|
||||
const operate = operates[operates.length - 1];
|
||||
if (operate.type === TrainType && operate.val) {
|
||||
return {
|
||||
type: operate.type,
|
||||
code: operate[0].code,
|
||||
over: true,
|
||||
operation: TrainOperation.editTrainNo.event,
|
||||
val: operate.val
|
||||
};
|
||||
}
|
||||
return { error: true };
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -221,86 +220,85 @@ function handleMenuEditTrainNo(operates) {
|
||||
*/
|
||||
|
||||
function handleMenuLimitSpeed(operates) {
|
||||
if (operates.length > 0) {
|
||||
let operate = operates[0];
|
||||
if (operate.type === TrainType && operate.code) {
|
||||
return {
|
||||
type: operate.type,
|
||||
code: operate.code,
|
||||
over: true,
|
||||
operation: TrainOperation.limitSpeed.event,
|
||||
};
|
||||
}
|
||||
return { error: true };
|
||||
}
|
||||
return null;
|
||||
if (operates.length > 0) {
|
||||
const operate = operates[0];
|
||||
if (operate.type === TrainType && operate.code) {
|
||||
return {
|
||||
type: operate.type,
|
||||
code: operate.code,
|
||||
over: true,
|
||||
operation: TrainOperation.limitSpeed.event
|
||||
};
|
||||
}
|
||||
return { error: true };
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 处理右键菜单 设置计划车
|
||||
* @param {*} operates
|
||||
*/
|
||||
|
||||
function handleMenuSetPlanTrainId(operates) {
|
||||
if (operates.length > 0) {
|
||||
let operate = operates[0];
|
||||
if (operate.type === TrainType && operate.code) {
|
||||
return {
|
||||
type: operate.type,
|
||||
code: operate.code,
|
||||
over: true,
|
||||
operation: TrainOperation.setPlanTrainId.event,
|
||||
};
|
||||
}
|
||||
return { error: true };
|
||||
}
|
||||
return null;
|
||||
if (operates.length > 0) {
|
||||
const operate = operates[0];
|
||||
if (operate.type === TrainType && operate.code) {
|
||||
return {
|
||||
type: operate.type,
|
||||
code: operate.code,
|
||||
over: true,
|
||||
operation: TrainOperation.setPlanTrainId.event
|
||||
};
|
||||
}
|
||||
return { error: true };
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function handleMenuAddPlanTrainId(operates) {
|
||||
if (operates.length > 0) {
|
||||
let operate = operates[0];
|
||||
if (operate.type === TrainType && operate.code) {
|
||||
return {
|
||||
type: operate.type,
|
||||
code: operate.code,
|
||||
over: true,
|
||||
operation: TrainOperation.addPlanTrainId.event,
|
||||
};
|
||||
}
|
||||
return { error: true };
|
||||
}
|
||||
return null;
|
||||
if (operates.length > 0) {
|
||||
const operate = operates[0];
|
||||
if (operate.type === TrainType && operate.code) {
|
||||
return {
|
||||
type: operate.type,
|
||||
code: operate.code,
|
||||
over: true,
|
||||
operation: TrainOperation.addPlanTrainId.event
|
||||
};
|
||||
}
|
||||
return { error: true };
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function handleMenuMoveEventlyTrainId(operates) {
|
||||
if (operates.length > 0) {
|
||||
let operate = operates[0];
|
||||
if (operate.type === TrainType && operate.code) {
|
||||
return {
|
||||
type: operate.type,
|
||||
code: operate.code,
|
||||
over: true,
|
||||
operation: TrainOperation.moveEventlyTrainId.event,
|
||||
};
|
||||
}
|
||||
return { error: true };
|
||||
}
|
||||
return null;
|
||||
if (operates.length > 0) {
|
||||
const operate = operates[0];
|
||||
if (operate.type === TrainType && operate.code) {
|
||||
return {
|
||||
type: operate.type,
|
||||
code: operate.code,
|
||||
over: true,
|
||||
operation: TrainOperation.moveEventlyTrainId.event
|
||||
};
|
||||
}
|
||||
return { error: true };
|
||||
}
|
||||
return null;
|
||||
}
|
||||
function handleMenuDeletePlanTrainId(operates) {
|
||||
if (operates.length > 0) {
|
||||
let operate = operates[0];
|
||||
if (operate.type === TrainType && operate.code) {
|
||||
return {
|
||||
type: operate.type,
|
||||
code: operate.code,
|
||||
over: true,
|
||||
operation: TrainOperation.deletePlanTrainId.event,
|
||||
};
|
||||
}
|
||||
return { error: true };
|
||||
}
|
||||
return null;
|
||||
}
|
||||
if (operates.length > 0) {
|
||||
const operate = operates[0];
|
||||
if (operate.type === TrainType && operate.code) {
|
||||
return {
|
||||
type: operate.type,
|
||||
code: operate.code,
|
||||
over: true,
|
||||
operation: TrainOperation.deletePlanTrainId.event
|
||||
};
|
||||
}
|
||||
return { error: true };
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
@ -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 {
|
||||
|
@ -73,7 +73,8 @@ export default {
|
||||
y: 0
|
||||
},
|
||||
editModel: {},
|
||||
localParamName:'publish_cityCode'
|
||||
localParamName:'publish_cityCode',
|
||||
cityCode:'',
|
||||
// skinCode:''
|
||||
};
|
||||
},
|
||||
@ -116,8 +117,9 @@ export default {
|
||||
break;
|
||||
}
|
||||
case 'lessonDesign': {
|
||||
setSessionStorage('designType', 'lessonDesign');
|
||||
this.$router.push({ path: `${UrlConfig.design.lessonHome}/${obj.mapId}/${obj.skinCode}`, query: {cityCode: data.parent.data.cityCode} });
|
||||
setSessionStorage('designType', 'lessonDesign');
|
||||
debugger;
|
||||
this.$router.push({ path: `${UrlConfig.design.lessonHome}/${obj.mapId}/${obj.skinCode}`, query: {cityCode: this.cityCode} });
|
||||
break;
|
||||
}
|
||||
case 'runPlanDesign': {
|
||||
@ -135,6 +137,7 @@ export default {
|
||||
|
||||
// },
|
||||
async refresh(filterSelect) {
|
||||
this.cityCode=filterSelect;
|
||||
this.loading = true;
|
||||
this.treeData = this.treeList = [];
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user