操作调整

This commit is contained in:
joylink_fanyuhong 2020-02-12 15:14:14 +08:00
parent 244b30d1c8
commit 4275b4dc4a
10 changed files with 98 additions and 37 deletions

View File

@ -66,6 +66,8 @@ import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
// import ConfirmControl from './childDialog/confirmControl';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
import { deepAssign } from '@/utils/index';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'RouteSelection',
@ -184,19 +186,30 @@ export default {
this.row = row;
if (row) {
//
this.row.canSetting = true;
this.restoreBeforeDevices();
const containSectionList = [];
if (row.canSetting) {
//
if (row.containSectionList && row.containSectionList.length) {
if (row.routeSectionList && row.routeSectionList.length) {
//
row.containSectionList.forEach(elem => {
elem.cutOff = true;
row.routeSectionList.forEach(elem => {
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.beforeSectionList = row.containSectionList || [];
this.$store.dispatch('training/updateMapState', [...containSectionList]);
this.beforeSectionList = containSectionList || [];
//
const operate = {
@ -216,9 +229,12 @@ export default {
commit() {
if (this.row && this.row.canSetting) {
const operate = {
send: true,
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.arrangementRoute.menu.operation
over: true,
operation: OperationEvent.Signal.arrangementRoute.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE,
param: {
routeCode: this.row.code
}
};
this.loading = true;

View File

@ -102,7 +102,8 @@ export default {
},
computed: {
...mapGetters('map', [
'signalList'
'signalList',
'mapConfig'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
@ -155,7 +156,11 @@ export default {
return true;
}
});
return '';
if ((signalDirection && this.mapConfig.upDirection === 'right') || (!signalDirection && this.mapConfig.upDirection === 'left')) {
return '上行';
} else {
return '下行';
}
},
doClose() {
this.loading = false;

View File

@ -136,7 +136,8 @@ export default {
return disabled;
},
...mapGetters('map', [
'signalList'
'signalList',
'mapConfig'
])
},
mounted() {
@ -172,7 +173,11 @@ export default {
return true;
}
});
return '';
if ((signalDirection && this.mapConfig.upDirection === 'right') || (!signalDirection && this.mapConfig.upDirection === 'left')) {
return '上行';
} else {
return '下行';
}
},
doShow(operate, selected, tempData) {
this.selected = selected;

View File

@ -98,7 +98,8 @@ export default {
},
computed: {
...mapGetters('map', [
'signalList'
'signalList',
'mapConfig'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
@ -186,7 +187,11 @@ export default {
return true;
}
});
return '';
if ((signalDirection && this.mapConfig.upDirection === 'right') || (!signalDirection && this.mapConfig.upDirection === 'left')) {
return '上行';
} else {
return '下行';
}
},
doClose() {
this.loading = false;

View File

@ -144,7 +144,8 @@ export default {
},
...mapGetters('map', [
'signalList',
'sectionList'
'sectionList',
'mapConfig'
])
},
mounted() {
@ -180,7 +181,11 @@ export default {
return true;
}
});
return '';
if ((signalDirection && this.mapConfig.upDirection === 'right') || (!signalDirection && this.mapConfig.upDirection === 'left')) {
return '上行';
} else {
return '下行';
}
},
doShow(operate, selected, tempData) {
this.selected = selected;

View File

@ -42,31 +42,31 @@ export default {
menu: [],
menuNormal: {
Local: [
// {
// label: '',
// handler: this.fault,
// disabledCallback: MenuDisabledState.Section.fault,
// auth: { station: true, center: false }
// }
{
label: '区故解',
handler: this.fault,
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK,
auth: { station: true, center: false }
}
],
Center: [
{
label: '区故解',
handler: this.fault,
auth: { station: true, center: false },
auth: { station: false, center: true },
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK
},
{
label: '设置临时限速',
handler: this.setSpeed,
auth: { station: false, center: true },
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
},
// {
// label: '',
// handler: this.setSpeed,
// auth: { station: false, center: true },
// cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
// },
{
label: '属性',
handler: this.detail,
auth: { station: false, center: true },
cmdType:''
cmdType: CMD.Section.CMD_SECTION_DETAILS
}
]
},

View File

@ -37,6 +37,7 @@
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { deepAssign } from '@/utils/index';
export default {
name: 'RouteSelection',
@ -154,19 +155,30 @@ export default {
this.row = row;
if (row) {
//
this.row.canSetting = true;
this.restoreBeforeDevices();
const containSectionList = [];
if (!row.setting) {
//
if (row.routeSectionList && row.routeSectionList.length) {
//
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.beforeSectionList = row.routeSectionList || [];
this.$store.dispatch('training/updateMapState', [...containSectionList]);
this.beforeSectionList = containSectionList || [];
//
const operate = {

View File

@ -113,7 +113,9 @@ export default {
/** 取消临时限速 */
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: '属性'}
},
// 站台

View File

@ -182,6 +182,7 @@ const map = {
routeData: {}, // 进路数据
routeList: [], // 进路list
stepData: [], // 缓存数据
mapConfig: [], // 地图所属线路配置
recoverStepData: [], // 缓存恢复数据
seclectDeviceList: [], // 包围框选中元素列表
map: null, // 地图数据
@ -201,6 +202,9 @@ const map = {
mapList: (state) => {
return state.mapList;
},
mapConfig: (state) => {
return state.mapConfig;
},
routeList: (state) => {
return state.routeList;
},
@ -467,6 +471,9 @@ const map = {
state.mapDevice = {};
}
},
setMapConfig: (state, config) => {
state.mapConfig = config;
},
setSeclectDeviceList: (state, list) => {
state.seclectDeviceList = list;
},
@ -590,7 +597,9 @@ const map = {
setMapData: ({ commit }, map) => { // 设置地图数据
commit('setMapData', map);
},
setMapConfig: ({ commit }, config) => { // 设置地图所属线路
commit('setMapConfig', config);
},
setRouteData: ({ commit }, routeData) => { // 设置进路数据
commit('setRouteData', routeData);
},

View File

@ -46,6 +46,8 @@ export function loadNewMapDataByGroup(group) {
});
const routeData = resp.data.logicDataNew.routeList; // 设置进路数据
store.dispatch('map/setRouteData', routeData);
const mapConfig = resp.data.configVO;
store.dispatch('map/setMapConfig', mapConfig);
}).catch(error => {
reject(error);
});