操作调整
This commit is contained in:
parent
244b30d1c8
commit
4275b4dc4a
@ -66,6 +66,8 @@ import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
|||||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||||
// import ConfirmControl from './childDialog/confirmControl';
|
// import ConfirmControl from './childDialog/confirmControl';
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
|
import { deepAssign } from '@/utils/index';
|
||||||
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'RouteSelection',
|
name: 'RouteSelection',
|
||||||
@ -184,19 +186,30 @@ export default {
|
|||||||
this.row = row;
|
this.row = row;
|
||||||
if (row) {
|
if (row) {
|
||||||
// 恢复进路区段的切除状态
|
// 恢复进路区段的切除状态
|
||||||
|
this.row.canSetting = true;
|
||||||
this.restoreBeforeDevices();
|
this.restoreBeforeDevices();
|
||||||
|
const containSectionList = [];
|
||||||
if (row.canSetting) {
|
if (row.canSetting) {
|
||||||
// 设置选中区段为切除状态
|
// 设置选中区段为切除状态
|
||||||
if (row.containSectionList && row.containSectionList.length) {
|
if (row.routeSectionList && row.routeSectionList.length) {
|
||||||
// 设置新选的进路区段为切除状态
|
// 设置新选的进路区段为切除状态
|
||||||
row.containSectionList.forEach(elem => {
|
row.routeSectionList.forEach(elem => {
|
||||||
elem.cutOff = true;
|
const section = deepAssign({}, this.$store.getters['map/getDeviceByCode'](elem));
|
||||||
|
if (section.logicSectionCodeList && section.logicSectionCodeList.length){
|
||||||
|
section.logicSectionCodeList.forEach(item => {
|
||||||
|
const sec = deepAssign({}, this.$store.getters['map/getDeviceByCode'](item));
|
||||||
|
sec.cutOff = true;
|
||||||
|
containSectionList.push(sec);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
section.cutOff = true;
|
||||||
|
containSectionList.push(section);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$store.dispatch('training/updateMapState', [...row.containSectionList]);
|
this.$store.dispatch('training/updateMapState', [...containSectionList]);
|
||||||
this.beforeSectionList = row.containSectionList || [];
|
this.beforeSectionList = containSectionList || [];
|
||||||
|
|
||||||
// 设置选中指令
|
// 设置选中指令
|
||||||
const operate = {
|
const operate = {
|
||||||
@ -216,9 +229,12 @@ export default {
|
|||||||
commit() {
|
commit() {
|
||||||
if (this.row && this.row.canSetting) {
|
if (this.row && this.row.canSetting) {
|
||||||
const operate = {
|
const operate = {
|
||||||
send: true,
|
over: true,
|
||||||
type: MapDeviceType.Signal.type,
|
operation: OperationEvent.Signal.arrangementRoute.menu.operation,
|
||||||
operation: OperationEvent.Signal.arrangementRoute.menu.operation
|
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE,
|
||||||
|
param: {
|
||||||
|
routeCode: this.row.code
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
@ -102,7 +102,8 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters('map', [
|
...mapGetters('map', [
|
||||||
'signalList'
|
'signalList',
|
||||||
|
'mapConfig'
|
||||||
]),
|
]),
|
||||||
show() {
|
show() {
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
@ -155,7 +156,11 @@ export default {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return '';
|
if ((signalDirection && this.mapConfig.upDirection === 'right') || (!signalDirection && this.mapConfig.upDirection === 'left')) {
|
||||||
|
return '上行';
|
||||||
|
} else {
|
||||||
|
return '下行';
|
||||||
|
}
|
||||||
},
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
@ -136,7 +136,8 @@ export default {
|
|||||||
return disabled;
|
return disabled;
|
||||||
},
|
},
|
||||||
...mapGetters('map', [
|
...mapGetters('map', [
|
||||||
'signalList'
|
'signalList',
|
||||||
|
'mapConfig'
|
||||||
])
|
])
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@ -172,7 +173,11 @@ export default {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return '';
|
if ((signalDirection && this.mapConfig.upDirection === 'right') || (!signalDirection && this.mapConfig.upDirection === 'left')) {
|
||||||
|
return '上行';
|
||||||
|
} else {
|
||||||
|
return '下行';
|
||||||
|
}
|
||||||
},
|
},
|
||||||
doShow(operate, selected, tempData) {
|
doShow(operate, selected, tempData) {
|
||||||
this.selected = selected;
|
this.selected = selected;
|
||||||
|
@ -98,7 +98,8 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters('map', [
|
...mapGetters('map', [
|
||||||
'signalList'
|
'signalList',
|
||||||
|
'mapConfig'
|
||||||
]),
|
]),
|
||||||
show() {
|
show() {
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
@ -186,7 +187,11 @@ export default {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return '';
|
if ((signalDirection && this.mapConfig.upDirection === 'right') || (!signalDirection && this.mapConfig.upDirection === 'left')) {
|
||||||
|
return '上行';
|
||||||
|
} else {
|
||||||
|
return '下行';
|
||||||
|
}
|
||||||
},
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
@ -144,7 +144,8 @@ export default {
|
|||||||
},
|
},
|
||||||
...mapGetters('map', [
|
...mapGetters('map', [
|
||||||
'signalList',
|
'signalList',
|
||||||
'sectionList'
|
'sectionList',
|
||||||
|
'mapConfig'
|
||||||
])
|
])
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@ -180,7 +181,11 @@ export default {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return '';
|
if ((signalDirection && this.mapConfig.upDirection === 'right') || (!signalDirection && this.mapConfig.upDirection === 'left')) {
|
||||||
|
return '上行';
|
||||||
|
} else {
|
||||||
|
return '下行';
|
||||||
|
}
|
||||||
},
|
},
|
||||||
doShow(operate, selected, tempData) {
|
doShow(operate, selected, tempData) {
|
||||||
this.selected = selected;
|
this.selected = selected;
|
||||||
|
@ -42,31 +42,31 @@ export default {
|
|||||||
menu: [],
|
menu: [],
|
||||||
menuNormal: {
|
menuNormal: {
|
||||||
Local: [
|
Local: [
|
||||||
// {
|
{
|
||||||
// label: '区故解',
|
label: '区故解',
|
||||||
// handler: this.fault,
|
handler: this.fault,
|
||||||
// disabledCallback: MenuDisabledState.Section.fault,
|
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK,
|
||||||
// auth: { station: true, center: false }
|
auth: { station: true, center: false }
|
||||||
// }
|
}
|
||||||
],
|
],
|
||||||
Center: [
|
Center: [
|
||||||
{
|
{
|
||||||
label: '区故解',
|
label: '区故解',
|
||||||
handler: this.fault,
|
handler: this.fault,
|
||||||
auth: { station: true, center: false },
|
auth: { station: false, center: true },
|
||||||
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK
|
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
label: '设置临时限速',
|
// label: '设置临时限速',
|
||||||
handler: this.setSpeed,
|
// handler: this.setSpeed,
|
||||||
auth: { station: false, center: true },
|
// auth: { station: false, center: true },
|
||||||
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
|
// cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
label: '属性',
|
label: '属性',
|
||||||
handler: this.detail,
|
handler: this.detail,
|
||||||
auth: { station: false, center: true },
|
auth: { station: false, center: true },
|
||||||
cmdType:''
|
cmdType: CMD.Section.CMD_SECTION_DETAILS
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -37,6 +37,7 @@
|
|||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
|
import { deepAssign } from '@/utils/index';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'RouteSelection',
|
name: 'RouteSelection',
|
||||||
@ -154,19 +155,30 @@ export default {
|
|||||||
this.row = row;
|
this.row = row;
|
||||||
if (row) {
|
if (row) {
|
||||||
// 恢复进路区段的切除状态
|
// 恢复进路区段的切除状态
|
||||||
|
this.row.canSetting = true;
|
||||||
this.restoreBeforeDevices();
|
this.restoreBeforeDevices();
|
||||||
|
const containSectionList = [];
|
||||||
if (!row.setting) {
|
if (!row.setting) {
|
||||||
// 设置选中区段为切除状态
|
// 设置选中区段为切除状态
|
||||||
if (row.routeSectionList && row.routeSectionList.length) {
|
if (row.routeSectionList && row.routeSectionList.length) {
|
||||||
// 设置新选的进路区段为切除状态
|
// 设置新选的进路区段为切除状态
|
||||||
row.routeSectionList.forEach(elem => {
|
row.routeSectionList.forEach(elem => {
|
||||||
elem.cutOff = true;
|
const section = deepAssign({}, this.$store.getters['map/getDeviceByCode'](elem));
|
||||||
|
if (section.logicSectionCodeList && section.logicSectionCodeList.length){
|
||||||
|
section.logicSectionCodeList.forEach(item => {
|
||||||
|
const sec = deepAssign({}, this.$store.getters['map/getDeviceByCode'](item));
|
||||||
|
sec.cutOff = true;
|
||||||
|
containSectionList.push(sec);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
section.cutOff = true;
|
||||||
|
containSectionList.push(section);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$store.dispatch('training/updateMapState', [...row.routeSectionList]);
|
this.$store.dispatch('training/updateMapState', [...containSectionList]);
|
||||||
this.beforeSectionList = row.routeSectionList || [];
|
this.beforeSectionList = containSectionList || [];
|
||||||
|
|
||||||
// 设置选中指令
|
// 设置选中指令
|
||||||
const operate = {
|
const operate = {
|
||||||
|
@ -113,7 +113,9 @@ export default {
|
|||||||
/** 取消临时限速 */
|
/** 取消临时限速 */
|
||||||
CMD_SECTION_CANCEL_LIMIT_SPEED:{value:'Section_Cancel_Limit_Speed', label: '取消临时限速'},
|
CMD_SECTION_CANCEL_LIMIT_SPEED:{value:'Section_Cancel_Limit_Speed', label: '取消临时限速'},
|
||||||
/** 确认计轴有效 */
|
/** 确认计轴有效 */
|
||||||
CMD_SECTION_COMFIRMATION_AXLE:{value:'Section_Comfirmation_Axle', label: '确认计轴有效'}
|
CMD_SECTION_COMFIRMATION_AXLE:{value:'Section_Comfirmation_Axle', label: '确认计轴有效'},
|
||||||
|
/** 详情 */
|
||||||
|
CMD_SECTION_DETAILS: {value: 'Section_Details', label: '属性'}
|
||||||
},
|
},
|
||||||
|
|
||||||
// 站台
|
// 站台
|
||||||
|
@ -182,6 +182,7 @@ const map = {
|
|||||||
routeData: {}, // 进路数据
|
routeData: {}, // 进路数据
|
||||||
routeList: [], // 进路list
|
routeList: [], // 进路list
|
||||||
stepData: [], // 缓存数据
|
stepData: [], // 缓存数据
|
||||||
|
mapConfig: [], // 地图所属线路配置
|
||||||
recoverStepData: [], // 缓存恢复数据
|
recoverStepData: [], // 缓存恢复数据
|
||||||
seclectDeviceList: [], // 包围框选中元素列表
|
seclectDeviceList: [], // 包围框选中元素列表
|
||||||
map: null, // 地图数据
|
map: null, // 地图数据
|
||||||
@ -201,6 +202,9 @@ const map = {
|
|||||||
mapList: (state) => {
|
mapList: (state) => {
|
||||||
return state.mapList;
|
return state.mapList;
|
||||||
},
|
},
|
||||||
|
mapConfig: (state) => {
|
||||||
|
return state.mapConfig;
|
||||||
|
},
|
||||||
routeList: (state) => {
|
routeList: (state) => {
|
||||||
return state.routeList;
|
return state.routeList;
|
||||||
},
|
},
|
||||||
@ -467,6 +471,9 @@ const map = {
|
|||||||
state.mapDevice = {};
|
state.mapDevice = {};
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
setMapConfig: (state, config) => {
|
||||||
|
state.mapConfig = config;
|
||||||
|
},
|
||||||
setSeclectDeviceList: (state, list) => {
|
setSeclectDeviceList: (state, list) => {
|
||||||
state.seclectDeviceList = list;
|
state.seclectDeviceList = list;
|
||||||
},
|
},
|
||||||
@ -590,7 +597,9 @@ const map = {
|
|||||||
setMapData: ({ commit }, map) => { // 设置地图数据
|
setMapData: ({ commit }, map) => { // 设置地图数据
|
||||||
commit('setMapData', map);
|
commit('setMapData', map);
|
||||||
},
|
},
|
||||||
|
setMapConfig: ({ commit }, config) => { // 设置地图所属线路
|
||||||
|
commit('setMapConfig', config);
|
||||||
|
},
|
||||||
setRouteData: ({ commit }, routeData) => { // 设置进路数据
|
setRouteData: ({ commit }, routeData) => { // 设置进路数据
|
||||||
commit('setRouteData', routeData);
|
commit('setRouteData', routeData);
|
||||||
},
|
},
|
||||||
|
@ -46,6 +46,8 @@ export function loadNewMapDataByGroup(group) {
|
|||||||
});
|
});
|
||||||
const routeData = resp.data.logicDataNew.routeList; // 设置进路数据
|
const routeData = resp.data.logicDataNew.routeList; // 设置进路数据
|
||||||
store.dispatch('map/setRouteData', routeData);
|
store.dispatch('map/setRouteData', routeData);
|
||||||
|
const mapConfig = resp.data.configVO;
|
||||||
|
store.dispatch('map/setMapConfig', mapConfig);
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
reject(error);
|
reject(error);
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user