Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
3968331bbe
@ -413,7 +413,6 @@ class SkinCode extends defaultStyle {
|
||||
block: false // 封锁显示
|
||||
}
|
||||
};
|
||||
|
||||
this[deviceType.Line] = {
|
||||
lineColor: '#FFFFFF' // 线条颜色
|
||||
};
|
||||
|
@ -165,6 +165,7 @@ class SkinCode extends defaultStyle {
|
||||
},
|
||||
lamp: {
|
||||
bgShow: false, // 是否被选中
|
||||
logicColor: true, // cbtc通信是否影响灯颜色
|
||||
guidName: 'singleRY', // 默认引导类型
|
||||
borderVariable: true, // 信号灯边框可变
|
||||
stopWidth: 2, // 禁止线宽度
|
||||
|
@ -314,7 +314,21 @@ class Signal extends Group {
|
||||
}
|
||||
|
||||
// 关闭
|
||||
close() {
|
||||
close(logicLight) {
|
||||
if (this.style.Signal.lamp.logicColor && logicLight) {
|
||||
// 逻辑点灯影响灯颜色仅西安二且暂无双灯
|
||||
if (this.count == 1) {
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.grayColor);
|
||||
this.insideTriangle.show();
|
||||
this.insideTriangle.setStyle({fill: this.style.Signal.lamp.redColor});
|
||||
setTimeout(()=> {
|
||||
this.insideTriangle.setStyle({fill: '#000'});
|
||||
}, 500);
|
||||
setTimeout(()=> {
|
||||
this.insideTriangle.setStyle({fill: this.style.Signal.lamp.redColor});
|
||||
}, 1000);
|
||||
}
|
||||
} else {
|
||||
if (this.count == 2) { // 双灯
|
||||
this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.redColor);
|
||||
this.lamps[1] && this.lamps[1].setColor(this.style.backgroundColor);
|
||||
@ -327,8 +341,24 @@ class Signal extends Group {
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* 正向开放*/
|
||||
openPositive() {
|
||||
openPositive(logicLight) {
|
||||
if (this.style.Signal.lamp.logicColor && logicLight) {
|
||||
// 逻辑点灯影响灯颜色仅西安二且暂无双灯
|
||||
if (this.count == 1) {
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.grayColor);
|
||||
this.insideTriangle.show();
|
||||
this.insideTriangle.setStyle({fill: this.style.Signal.lamp.greenColor});
|
||||
setTimeout(()=> {
|
||||
this.insideTriangle.setStyle({fill: '#000'});
|
||||
}, 500);
|
||||
setTimeout(()=> {
|
||||
this.insideTriangle.setStyle({fill: this.style.Signal.lamp.greenColor});
|
||||
}, 1000);
|
||||
}
|
||||
} else {
|
||||
this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.greenColor);
|
||||
this.lamps[1] && this.lamps[1].setColor(this.style.backgroundColor); // 设置黑色
|
||||
this.virtualSignal && this.virtualSignal.setColor(this.style.Signal.lamp.greenColor);
|
||||
@ -339,8 +369,23 @@ class Signal extends Group {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
/* 侧向开放 */
|
||||
openLateral() {
|
||||
openLateral(logicLight) {
|
||||
if (this.style.Signal.lamp.logicColor && logicLight) {
|
||||
if (this.count == 1) {
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.grayColor);
|
||||
this.insideTriangle.show();
|
||||
this.insideTriangle.setStyle({fill: this.style.Signal.lamp.yellowColor});
|
||||
setTimeout(()=> {
|
||||
this.insideTriangle.setStyle({fill: '#000'});
|
||||
}, 1000);
|
||||
setTimeout(()=> {
|
||||
this.insideTriangle.setStyle({fill: this.style.Signal.lamp.yellowColor});
|
||||
}, 2000);
|
||||
}
|
||||
} else {
|
||||
this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.yellowColor);
|
||||
this.lamps[1] && this.lamps[1].setColor(this.style.backgroundColor);
|
||||
if (this.style.Signal.lamp.guidName === 'doubleAndBase') { // 设置底座颜色
|
||||
@ -350,6 +395,7 @@ class Signal extends Group {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 列车进路
|
||||
trainRoute() {
|
||||
this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.yellowColor);
|
||||
@ -529,9 +575,9 @@ class Signal extends Group {
|
||||
model.blockade && this.block();
|
||||
/** 设置灯的颜色 */
|
||||
model.redOpen && model.yellowOpen && !model.greenOpen && this.guid(); // 引导信号显示
|
||||
model.redOpen && !model.yellowOpen && !model.greenOpen && this.close(); // 信号关闭
|
||||
model.greenOpen && !model.redOpen && !model.yellowOpen && this.openPositive(); // 信号正向开放
|
||||
model.yellowOpen && !model.redOpen && !model.greenOpen && this.openLateral(); // 信号侧向开放
|
||||
model.redOpen && !model.yellowOpen && !model.greenOpen && this.close(model.logicLight); // 信号关闭
|
||||
model.greenOpen && !model.redOpen && !model.yellowOpen && this.openPositive(model.logicLight); // 信号正向开放
|
||||
model.yellowOpen && !model.redOpen && !model.greenOpen && this.openLateral(model.logicLight); // 信号侧向开放
|
||||
/** 进路交人工控或自动控 */
|
||||
!model.atsControl && this.setArtificialRouteClose();
|
||||
// 联锁自动进路通过
|
||||
|
@ -288,6 +288,7 @@ export default {
|
||||
this.returnModeGroupList = [];
|
||||
this.controlSwitchList = [];
|
||||
this.AxleList = [];
|
||||
this.SwitchFaultList = [];
|
||||
indicatorLightList.forEach(item => {
|
||||
switch (item._type) {
|
||||
case 'AtsControl':
|
||||
@ -341,6 +342,9 @@ export default {
|
||||
case 'Axle':
|
||||
this.AxleList.push(item);
|
||||
break;
|
||||
case 'SwitchFault':
|
||||
this.SwitchFaultList.push(item);
|
||||
break;
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -397,6 +401,9 @@ export default {
|
||||
case 'Axle':
|
||||
this.selectLists = this.AxleList;
|
||||
break;
|
||||
case 'SwitchFault':
|
||||
this.selectLists = this.SwitchFaultList;
|
||||
break;
|
||||
default :
|
||||
this.selectLists = this.intersiteControlList;
|
||||
break;
|
||||
|
@ -1005,26 +1005,15 @@ export default {
|
||||
edit() {
|
||||
this.$refs['dataform'].validate(valid => {
|
||||
if (valid) {
|
||||
if (
|
||||
this.editModel.type === '03' &&
|
||||
this.editModel.leftSectionCode &&
|
||||
this.editModel.rightSectionCode
|
||||
) {
|
||||
if (this.editModel.type === '03' && this.editModel.leftSectionCode && this.editModel.rightSectionCode) {
|
||||
this.$messageBox('道岔区段应仅有一侧关联区段!');
|
||||
return;
|
||||
}
|
||||
let models = [];
|
||||
const model = deepAssign(this.editModel, {
|
||||
_type: 'Section'
|
||||
}); // 修改元素model
|
||||
if (
|
||||
model.lengthFact > 5 &&
|
||||
(model.transferTrack ||
|
||||
model.reentryTrack ||
|
||||
model.standTrack)
|
||||
) {
|
||||
model.leftStopPointOffset = 5;
|
||||
model.rightStopPointOffset = model.lengthFact - 5;
|
||||
const model = deepAssign(this.editModel, { _type: 'Section' }); // 修改元素model
|
||||
if (model.lengthFact > 5 && (model.transferTrack || model.reentryTrack || model.standTrack)) {
|
||||
model.leftStopPointOffset = model.leftStopPointOffset || 5;
|
||||
model.rightStopPointOffset = model.rightStopPointOffset || model.lengthFact - 5;
|
||||
}
|
||||
const changeSectionList = this.handleOtherSectionChange(model);
|
||||
models = [model, ...changeSectionList];
|
||||
@ -1091,9 +1080,8 @@ export default {
|
||||
lengthFact += model.lengthFact;
|
||||
copySection.lengthFact = lengthFact.toFixed(3); // 自动获取 物理区段的 实际长度 是由逻辑区段相加
|
||||
if (copySection.lengthFact > 5) {
|
||||
copySection.leftStopPointOffset = 5;
|
||||
copySection.rightStopPointOffset =
|
||||
copySection.lengthFact - 5;
|
||||
copySection.leftStopPointOffset = copySection.leftStopPointOffset || 5;
|
||||
copySection.rightStopPointOffset = copySection.rightStopPointOffset || copySection.lengthFact - 5;
|
||||
}
|
||||
updataFlag = true;
|
||||
}
|
||||
@ -1203,6 +1191,7 @@ export default {
|
||||
);
|
||||
models = [...models, ...deleteObjAssociatedSection];
|
||||
_that.$emit('updateMapModel', models);
|
||||
this.clear();
|
||||
_that.deviceSelect();
|
||||
})
|
||||
.catch(error => {
|
||||
|
@ -201,7 +201,8 @@ export default {
|
||||
guideShow: false,
|
||||
stationCode: this.addModel.stationCode,
|
||||
callOn: true,
|
||||
turnBack: false
|
||||
turnBack: false,
|
||||
ctc: true
|
||||
};
|
||||
|
||||
this.sectionList.forEach(elem => {
|
||||
|
@ -17,16 +17,19 @@
|
||||
<create-signal ref="createSignal" :field="field" @signalSectionCode="signalSectionCode" @updateMapModel="updateMapModel" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane class="view-control" label="批量操作" name="three" :lazy="lazy">
|
||||
<el-collapse v-model="collapseActive" accordion style="margin-left: 20px">
|
||||
<el-collapse-item title="构建信号机偏移量" name="1">
|
||||
<el-form ref="mark" label-width="130px" :model="addModel" size="mini">
|
||||
<el-form-item label="左右偏移值" prop="number">
|
||||
<el-input v-model="addModel.number" style="width: 178px;" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="flex_box">
|
||||
<el-button type="primary" style="margin-right: 10px;" size="small" @click="editAll">构建信号机偏移量</el-button>
|
||||
<el-button type="primary" style="margin-right: 10px;" size="small" @click="editAll">设置</el-button>
|
||||
<el-button type="" style="margin: 0;" size="small" @click="questionList = []">{{ $t('map.clearHint') }}</el-button>
|
||||
</div>
|
||||
<hr style="width: 100%">
|
||||
</el-collapse-item>
|
||||
<el-collapse-item title="设置信号机类型" name="2">
|
||||
<el-form ref="signalType" label-width="130px" :model="typeModel" size="mini" style="margin-top: 40px">
|
||||
<el-form-item label="信号机类型:" prop="type">
|
||||
<el-select v-model="typeModel.type" placeholder="请选择">
|
||||
@ -40,9 +43,10 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="flex_box">
|
||||
<el-button type="primary" style="margin-right: 10px;" size="small" @click="setAllSignalType">设置全部信号机类型</el-button>
|
||||
<el-button type="primary" style="margin-right: 10px;" size="small" @click="setAllSignalType">设置</el-button>
|
||||
</div>
|
||||
<hr style="width: 100%">
|
||||
</el-collapse-item>
|
||||
<el-collapse-item title="设置信号机归属联锁站" name="3">
|
||||
<el-form ref="signalCiStation" label-width="130px" :model="ciModel" size="mini" style="margin-top: 40px;">
|
||||
<el-form-item label="信号机范围:">
|
||||
<el-select v-model="ciModel.stationList" multiple placeholder="请选择">
|
||||
@ -66,12 +70,25 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="flex_box">
|
||||
<el-button type="primary" style="margin-right: 10px;" size="small" @click="setCiStationSignal">设置归属联锁站</el-button>
|
||||
<el-button type="primary" style="margin-right: 10px;" size="small" @click="setCiStationSignal">设置</el-button>
|
||||
</div>
|
||||
<hr style="width: 100%">
|
||||
</el-collapse-item>
|
||||
<el-collapse-item title="设置引导信号" name="4">
|
||||
<div class="flex_box" style="margin-top: 20px">
|
||||
<el-button type="primary" style="margin-right: 10px;" size="small" @click="setSignalCallOn">批量设置引导信号</el-button>
|
||||
<el-button type="primary" style="margin-right: 10px;" size="small" @click="setSignalCallOn">设置</el-button>
|
||||
</div>
|
||||
</el-collapse-item>
|
||||
<el-collapse-item title="设置灭灯显示(CTC级)" name="5">
|
||||
<el-form ref="ctcForm" label-width="160px" :model="ctcModel" size="mini">
|
||||
<el-form-item label="是否灭灯显示(CTC级):" prop="number">
|
||||
<el-checkbox v-model="ctcModel.ctc" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="flex_box">
|
||||
<el-button type="primary" style="margin-right: 10px;" size="small" @click="setCtcShow">设置</el-button>
|
||||
</div>
|
||||
</el-collapse-item>
|
||||
</el-collapse>
|
||||
<div style="height: calc(100% - 90px);">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||
<el-card v-if="questionList.length" class="box-card">
|
||||
@ -106,6 +123,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
activeName: 'first',
|
||||
collapseActive: '',
|
||||
lazy: true,
|
||||
SignalDirectionList: [
|
||||
{ code: false, name: '向左' },
|
||||
@ -153,7 +171,8 @@ export default {
|
||||
guidePosition: { x: 0, y: 0 },
|
||||
interlockStationCode: '',
|
||||
callOn: true,
|
||||
turnBack: false
|
||||
turnBack: false,
|
||||
ctc: true // 是否灭灯显示
|
||||
},
|
||||
addModel: {
|
||||
number: 2
|
||||
@ -164,6 +183,9 @@ export default {
|
||||
ciModel: {
|
||||
stationList: [],
|
||||
ciStation: []
|
||||
},
|
||||
ctcModel: {
|
||||
ctc: true
|
||||
}
|
||||
};
|
||||
},
|
||||
@ -245,7 +267,8 @@ export default {
|
||||
{ prop: 'guidePosition.y', firstLevel: 'guidePosition', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' }
|
||||
] },
|
||||
{ prop: 'callOn', label: '是否引导信号:', type: 'checkbox'},
|
||||
{ prop: 'turnBack', label: '是否折返进路始端:', type: 'checkbox', isHidden: this.editModel.virtual}
|
||||
{ prop: 'turnBack', label: '是否折返进路始端:', type: 'checkbox', isHidden: this.editModel.virtual},
|
||||
{ prop: 'ctc', label: '是否灭灯显示(CTC级)', type: 'checkbox'}
|
||||
]
|
||||
},
|
||||
map: {
|
||||
@ -421,10 +444,8 @@ export default {
|
||||
},
|
||||
virtualChange(val) {
|
||||
if (val) {
|
||||
this.editModel.callOn = false;
|
||||
this.editModel.turnBack = false;
|
||||
} else {
|
||||
this.editModel.callOn = true;
|
||||
this.editModel.turnBack = false;
|
||||
}
|
||||
},
|
||||
@ -462,6 +483,16 @@ export default {
|
||||
this.$emit('updateMapModel', models);
|
||||
this.$message.success('数据构建成功!');
|
||||
},
|
||||
setCtcShow() {
|
||||
const models = [];
|
||||
this.signalList.forEach(item => {
|
||||
const signalModel = deepAssign({}, item); // 深拷贝
|
||||
signalModel.ctc = this.ctcModel.ctc;
|
||||
models.push(signalModel);
|
||||
});
|
||||
this.$emit('updateMapModel', models);
|
||||
this.$message.success('数据构建成功!');
|
||||
},
|
||||
// 寻找信号机关联区段
|
||||
findSection(signal) {
|
||||
// 01 向左 02 向右
|
||||
|
@ -139,9 +139,9 @@ export default {
|
||||
this.$message.success(this.$t('publish.deleteSuccess'));
|
||||
this.reloadTable();
|
||||
localStore.remove('mapId');
|
||||
}).catch(() => {
|
||||
}).catch((error) => {
|
||||
this.reloadTable();
|
||||
this.$messageBox(this.$t('error.deleteFailed'));
|
||||
this.$messageBox(this.$t('error.deleteFailed') + ':' + error.message);
|
||||
});
|
||||
}).catch(() => { });
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user