Merge remote-tracking branch 'origin/test'
This commit is contained in:
commit
3d3bca02a8
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div style="height:100%">
|
||||
<div style="height: calc(100% - 46px);">
|
||||
<div style="height: 100%;">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||
<el-form ref="showDelimiter" label-width="180px" size="mini">
|
||||
<el-form-item label="逻辑区段数量">
|
||||
@ -9,17 +9,18 @@
|
||||
<el-form-item label="是否显示分隔符">
|
||||
<el-checkbox v-model="isDelimiter" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" size="small" @click="editSectionNum">{{ $t('map.updateObj') }}</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item label="区段名称偏移Y坐标">
|
||||
<el-input-number v-model="distanceY" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" size="small" @click="editSectionDistance">{{ $t('map.updateObj') }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
<div class="button_box">
|
||||
<el-button-group class="map-draft-group">
|
||||
<el-button type="primary" size="small" @click="editSectionNum">{{ $t('map.updateObj') }}</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@ -74,6 +75,9 @@ export default {
|
||||
this.editModel.logicSectionCodeList.forEach(logicCode => {
|
||||
const section = this.$store.getters['map/getDeviceByCode'](logicCode);
|
||||
models.push(deepAssign(section, {_dispose: true}));
|
||||
|
||||
const trainWindowModel = this.$store.getters['map/getDeviceByCode'](section.trainWindowCode);
|
||||
models.push(deepAssign(trainWindowModel, {_dispose: true}));
|
||||
});
|
||||
if (this.logicNum === 0) {
|
||||
logicSectionCodeList = [];
|
||||
@ -209,6 +213,16 @@ export default {
|
||||
// 计算逻辑区段数量列表展示
|
||||
computedLogicSectionNumList(logicSectionCodeList) {
|
||||
this.logicNum = logicSectionCodeList ? logicSectionCodeList.length : 0;
|
||||
},
|
||||
// 修改逻辑区段偏移量
|
||||
editSectionDistance() {
|
||||
const models = [];
|
||||
this.editModel.logicSectionCodeList.forEach(logicCode => {
|
||||
const logicSection = deepAssign({}, this.$store.getters['map/getDeviceByCode'](logicCode));
|
||||
logicSection.namePosition = { x: 0, y: this.distanceY };
|
||||
models.push(logicSection);
|
||||
});
|
||||
this.$emit('updateMapModel', models, 'four');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -88,6 +88,18 @@
|
||||
<el-button type="primary" style="margin-right: 10px;" size="small" @click="setCtcShow">设置</el-button>
|
||||
</div>
|
||||
</el-collapse-item>
|
||||
<el-collapse-item title="设置灯位类型">
|
||||
<el-form ref="ctcForm" label-width="160px" :model="lampPositionModel" size="mini">
|
||||
<el-form-item label="灯位类型:" prop="lampPositionType">
|
||||
<el-select v-model="lampPositionModel.lampPositionType">
|
||||
<el-option v-for="item in SignalLampPositionTypeList" :key="item.code" :label="item.name" :value="item.code" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="flex_box">
|
||||
<el-button type="primary" style="margin-right: 10px;" size="small" @click="setLampPosition">设置</el-button>
|
||||
</div>
|
||||
</el-collapse-item>
|
||||
</el-collapse>
|
||||
<div style="height: calc(100% - 90px);">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||
@ -195,6 +207,9 @@ export default {
|
||||
guideModel: {
|
||||
scope: 'All',
|
||||
callOn: true
|
||||
},
|
||||
lampPositionModel: {
|
||||
lampPositionType: ''
|
||||
}
|
||||
};
|
||||
},
|
||||
@ -491,6 +506,16 @@ export default {
|
||||
this.$emit('updateMapModel', models);
|
||||
this.$message.success('数据构建成功!');
|
||||
},
|
||||
setLampPosition() {
|
||||
const models = [];
|
||||
this.signalList.forEach(item => {
|
||||
const signalModel = deepAssign({}, item); // 深拷贝
|
||||
signalModel.lampPositionType = this.lampPositionModel.lampPositionType;
|
||||
models.push(signalModel);
|
||||
});
|
||||
this.$emit('updateMapModel', models);
|
||||
this.$message.success('数据构建成功!');
|
||||
},
|
||||
// 寻找信号机关联区段
|
||||
findSection(signal) {
|
||||
// 01 向左 02 向右
|
||||
|
Loading…
Reference in New Issue
Block a user