This commit is contained in:
sunzhenyu 2020-01-09 11:19:10 +08:00
commit c191afd2b7
11 changed files with 131 additions and 35 deletions

View File

@ -518,14 +518,13 @@ export function menuFiltration(menuObj) {
} else {
control = store.getters['map/getStationControlByStationCode'](selected.stationCode);
}
console.log('============', control);
if (control) {
if (store.state.training.prdType != '') {
const type = SystemType[store.state.training.prdType];
const status = StationControlType[control.status];
menu = [...menuObj[type]];
if (menu.constructor === Array) {
console.log('============1', menu);
menu.forEach(elem => {
if (elem.type === 'separator') {
elem.show = true;
@ -537,7 +536,6 @@ export function menuFiltration(menuObj) {
if (!elem.auth['station'] && !elem.auth['center']) { // 控制不显示
elem.show = false;
}
console.log('222222222', elem);
elem.defaultDisabled = !elem.auth[status];
}
});

View File

@ -159,8 +159,14 @@ deviceState[deviceType.Station] = {
fault: {
Default: false /** 非故障*/
},
status: {
Default: '01', /** 中控(缺省值)*/
State01: '01', /** 中控 */
State02: '02', /** 站控 */
State03: '03' /** 紧急站控 */
},
controlMode: {
Default: 'Center' /** 中控(默认值)*/
Default: 'Center'
// Center 中控
// Local 站控
// Emergency 紧急站控
@ -210,6 +216,21 @@ deviceState[deviceType.StationStand] = {
State01: '01', /** 关门 */
State02: '02' /** 开门 */
},
/** 扣车状态*/
holdStatus: {
Default: '01', /** 未设置扣车(缺省值)*/
State01: '01', /** 未设置扣车*/
State02: '02', /** 车站扣车*/
State03: '03', /** 中心扣车*/
State04: '04' /** 中心+车站扣车*/
},
/** 跳停*/
jumpStopStatus: {
Default: '01', /** 未设置跳停(缺省值)*/
State01: '01', /** 未设置跳停 */
State02: '02', /** 指定列车跳停 */
State03: '03' /** 全部跳停 */
},
stationHoldTrain: false, // 车站是否扣车
centerHoldTrain: false, // 中心是否扣车
allSkip: false, // 是否全部跳停

View File

@ -58,7 +58,53 @@ export default {
{
label: '追踪号',
handler: '',
cmdType: ''
children: [
{
label: '目的地ID',
handler: '',
cmdType: ''
},
{
label: '删除ID',
handler: '',
cmdType: ''
},
{
label: '更改追踪号',
handler: '',
cmdType: ''
},
{
label: '交换追踪号',
handler: '',
cmdType: ''
},
{
label: '运行等级',
handler: '',
cmdType: ''
},
{
label: '列车模式',
handler: '',
cmdType: ''
},
{
label: '惰性模式',
handler: '',
cmdType: ''
},
{
label: '旁路模式',
handler: '',
cmdType: ''
},
{
label: '开门禁止',
handler: '',
cmdType: ''
}
]
},
{
label: '列车明细',

View File

@ -421,7 +421,6 @@ export default {
},
choose(upDown) {
// code
console.log(upDown, this.radio);
const operate = {
operation: OperationEvent.StationStand.cancelDetainTrain.choose.operation
};

View File

@ -59,9 +59,9 @@ export function parser(data, skinCode) {
mapDevice[elem.code] = createDevice(deviceType.StationStand, elem, propConvert);
}, this);
// zrUtil.each(data.stationControlList || [], elem => {
// mapDevice[elem.code] = createDevice(deviceType.StationControl, elem, propConvert);
// }, this);
zrUtil.each(data.stationControlList || [], elem => {
mapDevice[elem.code] = createDevice(deviceType.StationControl, elem, propConvert);
}, this);
zrUtil.each(data.counterList || [], elem => {
mapDevice[elem.code] = createDevice(deviceType.StationCounter, elem, propConvert);

View File

@ -1,5 +1,6 @@
<template>
<div class="jlmap-canvas" :style="{ width: width+'px', height: height+'px' }">
<div v-show="maskOpen" class="mask" />
<div :id="canvasId" style="background: #000;" />
<progress-bar ref="progressBar" />
<zoom-box v-if="!isScreen" :scale-rate="dataZoom.scaleRate" @setShrink="setShrink" @setMagnify="setMagnify" />
@ -72,6 +73,9 @@ export default {
},
isScreen() {
return this.$route.params.mode == 'dp' || this.$store.state.training.roles == 'BigScreen';
},
maskOpen() {
return this.$store.state.config.maskOpen;
}
},
watch: {
@ -292,6 +296,16 @@ export default {
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.mask{
opacity: 0;
background: #000;
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
z-index: 9;
}
.jlmap-canvas {
position: relative;
-moz-user-select: none;

View File

@ -236,10 +236,10 @@ export default {
}
});
updateRealDevicesNew(this.$route.query.group, paramsList).then(res => {
this.$message.success(this.$t('tip.updateRealDeviceSuccess'));
this.$message.success(this.$t('tip.updateRealDeviceConnectionSuccess'));
this.doClose();
}).catch(() => {
this.$message.error(this.$t('tip.updateRealDeviceFailed'));
this.$message.error(this.$t('tip.updateRealDeviceConnectionFailed'));
});
},
doSave() {

View File

@ -1,5 +1,6 @@
<template>
<div class="jlmap-canvas" :style="{ width: width+'px', height: height+'px' }" @mousemove.stop="mousemove">
<div v-show="maskOpen" class="mask" />
<div :id="canvasId" style="background: #000;" class="display_canvas" />
<progress-bar ref="progressBar" />
<zoom-box v-if="!isScreen" :scale-rate="dataZoom.scaleRate" @setShrink="setShrink" @setMagnify="setMagnify" />
@ -85,6 +86,9 @@ export default {
},
isScreen() {
return this.$route.params.mode == 'dp' || this.$store.state.training.roles == 'BigScreen';
},
maskOpen() {
return this.$store.state.config.maskOpen;
}
},
watch: {
@ -313,6 +317,16 @@ export default {
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.mask{
opacity: 0;
background: #000;
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
z-index: 9;
}
.jlmap-canvas {
position: relative;
-moz-user-select: none;

View File

@ -236,10 +236,10 @@ export default {
}
});
updateRealDevicesNew(this.$route.query.group, paramsList).then(res => {
this.$message.success(this.$t('tip.updateRealDeviceSuccess'));
this.$message.success(this.$t('tip.updateRealDeviceConnectionSuccess'));
this.doClose();
}).catch(() => {
this.$message.error(this.$t('tip.updateRealDeviceFailed'));
this.$message.error(this.$t('tip.updateRealDeviceConnectionFailed'));
});
},
doSave() {

View File

@ -525,7 +525,6 @@ export default {
});
pointModel.forEach(item => {
const slope2 = (item.points[item.points.length - 1].y - item.points[0].y) / (item.points[item.points.length - 1].x - item.points[0].x);
// console.log(slope1, slope2, pointModel, '---------');
if (this.checkPointsCoincide(this.oldPoint[0], item.points[item.points.length - 1])) {
if ((slope1 >= 0 && slope2 >= 0) || (slope1 <= 0 && slope2 <= 0)) {
item.points[item.points.length - 1].x = model.points[0].x;

View File

@ -84,14 +84,15 @@ export default {
signalLeftValue: [
{label: '输入-故障表示位', value: 'i_f'},
{label: '输入-绿灯表示位', value: 'i_g'},
{label: '输入-红灯表示位', value: 'i_r'},
{label: '输入-黄灯表示位', value: 'i_y'}
{label: '输入-黄灯表示位', value: 'i_y'},
{label: '输入-黄灯表示位', value: 'i_yr'}
],
signalRightValue: [
{label: '输出-故障控制位', value: 'o_f'},
{label: '输出-绿灯控制位', value: 'o_g'},
{label: '输出-红灯控制位', value: 'o_r'},
{label: '输出-黄灯控制位', value: 'o_y'}
{label: '输出-黄灯控制位', value: 'o_y'},
{label: '输出-黄红灯控制位', value: 'o_yr'}
]
};
},
@ -223,28 +224,28 @@ export default {
{ validator: validateAddr, messageEmpty: '请填写输出网关字地址', trigger: 'blur' }
],
o_c: [
{ validator: validateDevice, messageEmpty: '请填写输-关门位', list: this.psdRightValue, trigger: 'blur' }
{ validator: validateDevice, messageEmpty: '请填写输-关门位', list: this.psdRightValue, trigger: 'blur' }
],
o_dc_s: [
{ validator: validateDevice, messageEmpty: '请填写输-关门信号灯控制位', list: this.psdRightValue, trigger: 'blur' }
{ validator: validateDevice, messageEmpty: '请填写输-关门信号灯控制位', list: this.psdRightValue, trigger: 'blur' }
],
o_dcl_s: [
{ validator: validateDevice, messageEmpty: '请填写输-关门且锁闭信号灯控制位', list: this.psdRightValue, trigger: 'blur' }
{ validator: validateDevice, messageEmpty: '请填写输-关门且锁闭信号灯控制位', list: this.psdRightValue, trigger: 'blur' }
],
o_do_s: [
{ validator: validateDevice, messageEmpty: '请填写输-开门信号灯控制位', list: this.psdRightValue, trigger: 'blur' }
{ validator: validateDevice, messageEmpty: '请填写输-开门信号灯控制位', list: this.psdRightValue, trigger: 'blur' }
],
o_ir_s: [
{ validator: validateDevice, messageEmpty: '请填写输-互锁解除信号灯控制位', list: this.psdRightValue, trigger: 'blur' }
{ validator: validateDevice, messageEmpty: '请填写输-互锁解除信号灯控制位', list: this.psdRightValue, trigger: 'blur' }
],
o_l: [
{ validator: validateDevice, messageEmpty: '请填写输-锁闭位', list: this.psdRightValue, trigger: 'blur' }
{ validator: validateDevice, messageEmpty: '请填写输-锁闭位', list: this.psdRightValue, trigger: 'blur' }
],
o_o: [
{ validator: validateDevice, messageEmpty: '请填写输-开门位', list: this.psdRightValue, trigger: 'blur' }
{ validator: validateDevice, messageEmpty: '请填写输-开门位', list: this.psdRightValue, trigger: 'blur' }
],
o_psl_s: [
{ validator: validateDevice, messageEmpty: '请填写输-PSL信号灯控制位', list: this.psdRightValue, trigger: 'blur' }
{ validator: validateDevice, messageEmpty: '请填写输-PSL信号灯控制位', list: this.psdRightValue, trigger: 'blur' }
]
};
break;
@ -258,8 +259,8 @@ export default {
{ prop:'i_addr', label:'输入网关字地址:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0},
{ prop: 'i_f', label: '输入-故障表示位:', type: 'text', rightWidth: '100px', maxlength: 4},
{ prop: 'i_g', label: '输入-绿灯表示位:', type: 'text', rightWidth: '100px', maxlength: 4},
{ prop: 'i_r', label: '输入-红灯表示位:', type: 'text', rightWidth: '100px', maxlength: 4},
{ prop: 'i_y', label: '输入-黄灯表示位:', type: 'text', rightWidth: '100px', maxlength: 4}
{ prop: 'i_y', label: '输入-黄灯表示位:', type: 'text', rightWidth: '100px', maxlength: 4},
{ prop: 'i_yr', label: '输入-黄灯表示位:', type: 'text', rightWidth: '100px', maxlength: 4}
]
};
this.leftRules = {
@ -272,11 +273,11 @@ export default {
i_g: [
{ validator: validateDevice, messageEmpty: '请填写输入-绿灯表示位', list: this.signalLeftValue, trigger: 'blur' }
],
i_r: [
{ validator: validateDevice, messageEmpty: '请填写输入-红灯表示位', list: this.signalLeftValue, trigger: 'blur' }
],
i_y: [
{ validator: validateDevice, messageEmpty: '请填写输入-黄灯表示位', list: this.signalLeftValue, trigger: 'blur' }
],
i_yr: [
{ validator: validateDevice, messageEmpty: '请填写输入-黄红灯表示位', list: this.signalLeftValue, trigger: 'blur'}
]
};
this.formRight = {
@ -287,7 +288,8 @@ export default {
{ prop: 'o_f', label: '输出-故障控制位:', type: 'text', rightWidth: '100px', maxlength: 4},
{ prop: 'o_g', label: '输出-绿灯控制位:', type: 'text', rightWidth: '100px', maxlength: 4},
{ prop: 'o_r', label: '输出-红灯控制位:', type: 'text', rightWidth: '100px', maxlength: 4},
{ prop: 'o_y', label: '输出-黄灯控制位:', type: 'text', rightWidth: '100px', maxlength: 4}
{ prop: 'o_y', label: '输出-黄灯控制位:', type: 'text', rightWidth: '100px', maxlength: 4},
{ prop: 'o_yr', label: '输出-黄红灯控制位', type: 'text', rightWidth: '100px', maxlength: 4}
]
};
this.rightRules = {
@ -295,16 +297,19 @@ export default {
{ validator: validateAddr, messageEmpty: '请填写输出网关字地址', trigger: 'blur' }
],
o_f: [
{ validator: validateDevice, messageEmpty: '请填写输-故障控制位', list: this.signalRightValue, trigger: 'blur' }
{ validator: validateDevice, messageEmpty: '请填写输-故障控制位', list: this.signalRightValue, trigger: 'blur' }
],
o_g: [
{ validator: validateDevice, messageEmpty: '请填写输-绿灯控制位', list: this.signalRightValue, trigger: 'blur' }
{ validator: validateDevice, messageEmpty: '请填写输-绿灯控制位', list: this.signalRightValue, trigger: 'blur' }
],
o_r: [
{ validator: validateDevice, messageEmpty: '请填写输-红灯控制位', list: this.signalRightValue, trigger: 'blur' }
{ validator: validateDevice, messageEmpty: '请填写输-红灯控制位', list: this.signalRightValue, trigger: 'blur' }
],
o_y: [
{ validator: validateDevice, messageEmpty: '请填写输入-黄灯控制位', list: this.signalRightValue, trigger: 'blur' }
{ validator: validateDevice, messageEmpty: '请填写输出-黄灯控制位', list: this.signalRightValue, trigger: 'blur' }
],
o_yr: [
{ validator: validateDevice, messageEmpty: '请填写输出-黄红灯控制位', list: this.signalRightValue, trigger: 'blur'}
]
};
break;