运行图加载调整&绘图设备道岔故障&佛山区段颜色
This commit is contained in:
parent
c3ca6de6d8
commit
8c122f93d4
@ -80,7 +80,7 @@ class SkinCode extends defaultStyle {
|
||||
beyondWidth: 0, // 区段宽超出宽度
|
||||
invadeColor: '#EF0C08', // 区段侵入颜色
|
||||
spareColor: '#3F3F3F', // 区段空闲颜色
|
||||
communicationOccupiedColor: '#FF329A', // 区段通信车占用颜色
|
||||
communicationOccupiedColor: '#FE0000', // 区段通信车占用颜色
|
||||
unCommunicationOccupiedColor: '#FE0000', // 区段非通讯车占用颜色
|
||||
routeLockColor: '#FFFFFF', // 区段路由锁定颜色
|
||||
faultLockColor: '#00FF00', // 区段故障锁闭颜色
|
||||
|
@ -80,7 +80,7 @@ class SkinCode extends defaultStyle {
|
||||
beyondWidth: 1, // 区段宽超出宽度
|
||||
invadeColor: '#EF0C08', // 区段侵入颜色
|
||||
spareColor: '#3F3F3F', // 区段空闲颜色
|
||||
communicationOccupiedColor: '#FE0000', // 区段通信车占用颜色
|
||||
communicationOccupiedColor: '#FF329A', // 区段通信车占用颜色
|
||||
unCommunicationOccupiedColor: '#FE0000', // 区段非通讯车占用颜色
|
||||
routeLockColor: '#FFFFFF', // 区段路由锁定颜色
|
||||
faultLockColor: '#9B4A0A', // 区段故障锁定颜色
|
||||
|
@ -439,7 +439,21 @@ class SkinCode extends defaultStyle {
|
||||
textColor: '#000000'
|
||||
}
|
||||
};
|
||||
|
||||
this[deviceType.SwitchFault] = {
|
||||
displayCondition: '01', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示)
|
||||
text: {
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
distance: 5 // 灯跟文字距离
|
||||
},
|
||||
lamp: {
|
||||
radiusR: 6, // 控制灯大小
|
||||
controlColor: '#000000', // 控制灯颜色
|
||||
offColor: '#ff0000',
|
||||
lineWidth: 2,
|
||||
strokeColor: '#FFFFFF' // 控制灯描边样式
|
||||
}
|
||||
};
|
||||
this[deviceType.ZcControl] = {
|
||||
text: {
|
||||
fontSize: 10, // 字体大小
|
||||
|
@ -235,4 +235,9 @@ deviceRender[deviceType.SplitStation] = {
|
||||
_type: deviceType.SplitStation,
|
||||
zlevel: 1
|
||||
};
|
||||
/** SwitchFault 道岔故障 */
|
||||
deviceRender[deviceType.SwitchFault] = {
|
||||
_type: deviceType.SwitchFault,
|
||||
zlevel: 1
|
||||
};
|
||||
export default deviceRender;
|
||||
|
@ -40,7 +40,8 @@ const deviceType = {
|
||||
ReturnModeGroup: 'ReturnModeGroup',
|
||||
ControlSwitch: 'ControlSwitch',
|
||||
Axle: 'Axle',
|
||||
SplitStation:'SplitStation'
|
||||
SplitStation:'SplitStation',
|
||||
SwitchFault: 'SwitchFault'
|
||||
};
|
||||
|
||||
export default deviceType;
|
||||
|
@ -21,7 +21,7 @@ export default class SaidLamp extends Group {
|
||||
this.model = model;
|
||||
this.style = style;
|
||||
this.deviceStyle = style[model._type];
|
||||
if (!this.deviceStyle) { return; }
|
||||
if (this.deviceStyle) {
|
||||
this.isShowShape = true;
|
||||
if (isShowThePrdType(model.prdType, this.deviceStyle.displayCondition) || model.previewOrMapDraw) {
|
||||
this.create();
|
||||
@ -32,10 +32,11 @@ export default class SaidLamp extends Group {
|
||||
this.setShowMode();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
create() {
|
||||
const model = this.model;
|
||||
const lampDevice = ['LeuControl', 'IntersiteControl', 'CenterCommunication', 'AtsControl', 'LocalControl', 'ChainControl', 'Maintain', 'PowerSupply', 'MaintenanceLamps', 'ZcCommunication'];
|
||||
const lampDevice = ['LeuControl', 'IntersiteControl', 'CenterCommunication', 'AtsControl', 'LocalControl', 'ChainControl', 'Maintain', 'PowerSupply', 'MaintenanceLamps', 'ZcCommunication', 'SwitchFault'];
|
||||
if (lampDevice.includes(this._type)) {
|
||||
this.control = new EControl({
|
||||
zlevel: this.zlevel,
|
||||
@ -47,8 +48,9 @@ export default class SaidLamp extends Group {
|
||||
r: this.deviceStyle.lamp.radiusR
|
||||
},
|
||||
subType: 'Control',
|
||||
lineWidth: 0,
|
||||
fill: this.deviceStyle.lamp.controlColor
|
||||
lineWidth: this.deviceStyle.lamp.lineWidth || 0,
|
||||
fill: this.deviceStyle.lamp.controlColor,
|
||||
stroke: this.deviceStyle.lamp.strokeColor
|
||||
},
|
||||
text: {
|
||||
position: [0, 0],
|
||||
@ -203,6 +205,7 @@ export default class SaidLamp extends Group {
|
||||
}
|
||||
setShowMode() {
|
||||
const showMode = this.model.showMode;
|
||||
if (this.deviceStyle) {
|
||||
const showConditions = this.deviceStyle.displayCondition;
|
||||
if (showConditions === '01' || showMode === showConditions) {
|
||||
this.control && this.control.show();
|
||||
@ -210,6 +213,7 @@ export default class SaidLamp extends Group {
|
||||
this.control && this.control.hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
setShowStation(stationCode) {
|
||||
if (!stationCode || this.model.stationCode === stationCode) {
|
||||
this.control && this.control.show();
|
||||
|
@ -25,7 +25,8 @@ export default class EControl extends Group {
|
||||
shape: this.arcStyle.shape,
|
||||
style: {
|
||||
lineWidth: this.arcStyle.lineWidth,
|
||||
fill: this.arcStyle.fill
|
||||
fill: this.arcStyle.fill,
|
||||
stroke: this.arcStyle.stroke
|
||||
},
|
||||
onmouseover: this.arcStyle.mouseover,
|
||||
onmouseout: this.arcStyle.mouseout
|
||||
|
@ -65,6 +65,7 @@ mapShape[deviceType.ModeStatusGroup] = SaidLamp;
|
||||
mapShape[deviceType.FaultStatusGroup] = SaidLamp;
|
||||
mapShape[deviceType.ReturnModeGroup] = SaidLamp;
|
||||
mapShape[deviceType.Axle] = SaidLamp;
|
||||
mapShape[deviceType.SwitchFault] = SaidLamp;
|
||||
mapShape[deviceType.SplitStation] = SplitStation;
|
||||
|
||||
function shapefactory(device, jmap) {
|
||||
|
@ -191,6 +191,9 @@ export function parser(data, skinCode, showConfig) {
|
||||
case 'ControlSwitch':
|
||||
mapDevice[elem.code] = createDevice(deviceType.ControlSwitch, elem, propConvert, showConfig);
|
||||
break;
|
||||
case 'SwitchFault':
|
||||
mapDevice[elem.code] = createDevice(deviceType.SwitchFault, elem, propConvert, showConfig);
|
||||
break;
|
||||
}
|
||||
}, this);
|
||||
|
||||
@ -310,6 +313,7 @@ export function updateMapData(state, model) {
|
||||
case deviceType.ControlSwitch: updateForList(model, state, 'indicatorLightList'); break;
|
||||
case deviceType.Axle: updateForList(model, state, 'indicatorLightList'); break;
|
||||
case deviceType.SplitStation: updateForList(model, state, 'splitStationList'); break;
|
||||
case deviceType.SwitchFault: updateForList(model, state, 'indicatorLightList'); break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -62,14 +62,16 @@ service.interceptors.response.use(
|
||||
});
|
||||
});
|
||||
});
|
||||
} else {
|
||||
Vue.prototype.$alert('<strong>服务异常: <i style="color: red;">' + res.message + '</i></strong>', '请求结果', {
|
||||
confirmButtonText: '确定',
|
||||
dangerouslyUseHTMLString: true,
|
||||
closeOnClickModal: false
|
||||
}).then(() => {
|
||||
// } else if (res.code == 500) {
|
||||
// Vue.prototype.$alert('<strong>服务异常: <i style="color: red;">' + res.message + '</i></strong>', '请求结果', {
|
||||
// confirmButtonText: '确定',
|
||||
// dangerouslyUseHTMLString: true,
|
||||
// closeOnClickModal: false
|
||||
// }).then(() => {
|
||||
// return Promise.reject(res);
|
||||
// });
|
||||
// } else {
|
||||
return Promise.reject(res);
|
||||
});
|
||||
}
|
||||
} else {
|
||||
return response.data;
|
||||
|
@ -84,7 +84,8 @@ export default {
|
||||
'LampFilament',
|
||||
'ReturnModeGroup',
|
||||
'ControlSwitch',
|
||||
'Axle'
|
||||
'Axle',
|
||||
'SwitchFault'
|
||||
],
|
||||
noNameTypeList: ['FaultStatusGroup', 'ModeStatusGroup', 'LampFilament', 'ReturnModeGroup', 'ControlSwitch', 'Axle'],
|
||||
typeList: [
|
||||
@ -104,7 +105,8 @@ export default {
|
||||
{ name: '信号灯丝告警', value: 'LampFilament'},
|
||||
{ name: '折返模式组', value: 'ReturnModeGroup'},
|
||||
{ name: 'LCW/ATS控制开关', value: 'ControlSwitch'},
|
||||
{ name: '计轴预复位', value: 'Axle'}
|
||||
{ name: '计轴预复位', value: 'Axle'},
|
||||
{ name: '道岔故障', value: 'SwitchFault'}
|
||||
],
|
||||
editModel: {
|
||||
code: '',
|
||||
@ -116,7 +118,8 @@ export default {
|
||||
y: 0
|
||||
},
|
||||
mfNum: 0,
|
||||
pfNum: 0
|
||||
pfNum: 0,
|
||||
switchCode: ''
|
||||
},
|
||||
addModel: {
|
||||
code: '',
|
||||
@ -128,7 +131,8 @@ export default {
|
||||
y: 0
|
||||
},
|
||||
mfNum: 0,
|
||||
pfNum: 0
|
||||
pfNum: 0,
|
||||
switchCode: ''
|
||||
},
|
||||
rules: {
|
||||
code: [
|
||||
@ -146,12 +150,14 @@ export default {
|
||||
stationCode: [
|
||||
{ required: true, message: this.$t('rules.pleaseSelectStationCode'), trigger: 'change'}
|
||||
]
|
||||
}
|
||||
},
|
||||
field: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationList',
|
||||
'switchList',
|
||||
'indicatorLightList'
|
||||
]),
|
||||
form() {
|
||||
@ -174,7 +180,8 @@ export default {
|
||||
] },
|
||||
{ prop: 'mfNum', label: '报警指示故障数量:', type: 'number', min: 0, isHidden: this.editModel.type !== 'FaultStatusGroup' },
|
||||
{ prop: 'pfNum', label: '电源故障数量:', type: 'number', min: 0, isHidden: this.editModel.type !== 'FaultStatusGroup'},
|
||||
{ prop:'stationCode', label: '所属车站', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList}
|
||||
{ prop: 'switchCode', label: '所属道岔:', type: 'selectHover', optionLabel: 'name&&code', optionValue: 'code', options: this.switchList, isHidden: this.editModel.type !== 'SwitchFault', hover: this.hover, buttonType: 'switchSelectCode', buttonShowType: this.isButtonType },
|
||||
{ prop:'stationCode', label: '所属车站:', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList}
|
||||
]
|
||||
}
|
||||
}
|
||||
@ -187,13 +194,14 @@ export default {
|
||||
items: [
|
||||
{ prop:'type', label: this.$t('map.saidLampType'), type: 'select', optionLabel: 'name', optionValue: 'value', options: this.typeList, change: true, deviceChange: this.typeChange},
|
||||
{ prop: 'name', label: this.$t('map.saidLampName'), type: 'input', isHidden: this.noNameTypeList.includes(this.addModel.type) },
|
||||
{ prop:'stationCode', label: '所属车站', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList, change: true, deviceChange: this.changeBelongStation},
|
||||
{ prop:'stationCode', label: '所属车站:', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList, change: true, deviceChange: this.changeBelongStation},
|
||||
{ prop: 'position', label: this.$t('map.textPoints'), type: 'coordinate', width: '140px', children: [
|
||||
{ prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' },
|
||||
{ prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' }
|
||||
] },
|
||||
{ prop: 'mfNum', label: '报警指示故障数量:', type: 'number', min: 0, isHidden: this.addModel.type !== 'FaultStatusGroup' },
|
||||
{ prop: 'pfNum', label: '电源故障数量:', type: 'number', min: 0, isHidden: this.addModel.type !== 'FaultStatusGroup'}
|
||||
{ prop: 'pfNum', label: '电源故障数量:', type: 'number', min: 0, isHidden: this.addModel.type !== 'FaultStatusGroup'},
|
||||
{ prop: 'switchCode', label: '所属道岔:', type: 'selectHover', optionLabel: 'name&&code', optionValue: 'code', options: this.switchList, isHidden: this.addModel.type !== 'SwitchFault', hover: this.hover, buttonType: 'switchSelectCode', buttonShowType: this.isButtonType }
|
||||
]
|
||||
};
|
||||
return form;
|
||||
@ -211,6 +219,9 @@ export default {
|
||||
],
|
||||
stationCode: [
|
||||
{ required: true, message: this.$t('rules.pleaseSelectStationCode'), trigger: 'change'}
|
||||
],
|
||||
switchCode: [
|
||||
{ required: true, message: '请选择所属道岔!', trigger: 'change'}
|
||||
]
|
||||
};
|
||||
},
|
||||
@ -224,8 +235,14 @@ export default {
|
||||
],
|
||||
stationCode: [
|
||||
{ required: true, message: this.$t('rules.pleaseSelectStationCode'), trigger: 'change'}
|
||||
],
|
||||
switchCode: [
|
||||
{ required: true, message: '请选择所属道岔!', trigger: 'change'}
|
||||
]
|
||||
};
|
||||
},
|
||||
isButtonType() {
|
||||
return this.field == 'switchSelectCode';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -250,6 +267,10 @@ export default {
|
||||
this.addModel.type = type;
|
||||
this.editModel.type = type;
|
||||
},
|
||||
hover(field) {
|
||||
this.field = field === this.field ? '' : field;
|
||||
this.$emit('saidLampHover', this.field);
|
||||
},
|
||||
handleIndicatorLightList(indicatorLightList) {
|
||||
this.atsControlList = [];
|
||||
this.centerCommunicationList = [];
|
||||
@ -385,9 +406,15 @@ export default {
|
||||
this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code));
|
||||
},
|
||||
deviceSelect(selected) {
|
||||
if (this.field.toUpperCase() === 'switchSelectCode'.toUpperCase() && selected._type.toUpperCase() === 'Switch'.toUpperCase()) {
|
||||
if (this.activeName === 'first') {
|
||||
this.editModel.switchCode = selected.code;
|
||||
} else {
|
||||
this.addModel.switchCode = selected.code;
|
||||
}
|
||||
} else if (selected && this.controlLampTypeList.includes(selected._type)) {
|
||||
this.$refs.dataform.resetFields();
|
||||
this.$refs.make.resetFields();
|
||||
if (selected && this.controlLampTypeList.includes(selected._type)) {
|
||||
this.activeName = 'first';
|
||||
this.editModel = deepAssign(this.editModel, selected);
|
||||
this.editModel.type = selected._type;
|
||||
|
@ -106,6 +106,7 @@
|
||||
:selected="selected"
|
||||
@updateMapModel="updateMapModel"
|
||||
@setCenter="setCenter"
|
||||
@saidLampHover="saidLampTab"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="$t('map.train')" class="tab_pane_box" name="Train">
|
||||
@ -281,7 +282,7 @@ export default {
|
||||
this.$emit('showMap');
|
||||
},
|
||||
handleSelectControlPage(device) {
|
||||
const controlLampTypeList = ['AtsControl', 'CenterCommunication', 'ChainControl', 'IntersiteControl', 'LeuControl', 'LocalControl', 'Maintain',
|
||||
const controlLampTypeList = ['AtsControl', 'CenterCommunication', 'ChainControl', 'IntersiteControl', 'LeuControl', 'LocalControl', 'Maintain', 'SwitchFault',
|
||||
'PowerSupply', 'NoOneReturn', 'MaintenanceLamps', 'ZcCommunication', 'FaultStatusGroup', 'ModeStatusGroup', 'LampFilament', 'ReturnModeGroup', 'ControlSwitch', 'Axle'];
|
||||
const type = device._type;
|
||||
if (this.stationType) {
|
||||
@ -300,7 +301,7 @@ export default {
|
||||
this.enabledTab = 'Section';
|
||||
} else if (type == 'AutomaticRoute' || type == 'AutoTurnBack' || type == 'AxleReset' || type == 'LimitControl' || type == 'GuideLock') {
|
||||
this.enabledTab = 'ControlDraft';
|
||||
} else if (controlLampTypeList.includes(type)) {
|
||||
} else if (controlLampTypeList.includes(type) || this.saidLampType) {
|
||||
this.enabledTab = 'ControlLamp';
|
||||
} else {
|
||||
this.enabledTab = type;
|
||||
@ -312,6 +313,9 @@ export default {
|
||||
psdTab(type) {
|
||||
this.psdType = type;
|
||||
},
|
||||
saidLampTab(type) {
|
||||
this.saidLampType = type;
|
||||
},
|
||||
standStationTab(type) {
|
||||
this.stationStandType = type;
|
||||
},
|
||||
|
@ -142,7 +142,7 @@ export default {
|
||||
click: this.handleViewPlanSchedule
|
||||
},
|
||||
{
|
||||
title: '仿真运行计划',
|
||||
title: '运行图管理',
|
||||
click: this.handleReloadTodayPlan
|
||||
}
|
||||
// {
|
||||
|
@ -23,10 +23,10 @@
|
||||
<el-table-column
|
||||
property="$loading"
|
||||
align="center"
|
||||
label="本次仿真加载中"
|
||||
label="当前状态"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-tag :type="scope.row.$loading?'success':'danger'">{{ scope.row.$loading? '是': '否' }}</el-tag>
|
||||
<el-tag :type="scope.row.$loading?'success':'danger'">{{ scope.row.$loading? '已加载': '未加载' }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
@ -63,7 +63,7 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return '管理本次仿真运行计划';
|
||||
return '运行图管理';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
@ -71,7 +71,7 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return '管理运行图计划表';
|
||||
return '管理运行计划';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -96,7 +96,7 @@ export default {
|
||||
return getRunPlanLoadList(params);
|
||||
},
|
||||
handleDelete(index, row) {
|
||||
this.$confirm('此操作将删除次日加载的运行图, 是否继续?', '提示', {
|
||||
this.$confirm('此操作将删除运行图, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
|
Loading…
Reference in New Issue
Block a user