信号机批量设置灯位类型
This commit is contained in:
parent
0f1ae1e8a8
commit
434d7fdbbe
@ -88,6 +88,18 @@
|
|||||||
<el-button type="primary" style="margin-right: 10px;" size="small" @click="setCtcShow">设置</el-button>
|
<el-button type="primary" style="margin-right: 10px;" size="small" @click="setCtcShow">设置</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-collapse-item>
|
</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>
|
</el-collapse>
|
||||||
<div style="height: calc(100% - 90px);">
|
<div style="height: calc(100% - 90px);">
|
||||||
<el-scrollbar wrap-class="scrollbar-wrapper">
|
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||||
@ -195,6 +207,9 @@ export default {
|
|||||||
guideModel: {
|
guideModel: {
|
||||||
scope: 'All',
|
scope: 'All',
|
||||||
callOn: true
|
callOn: true
|
||||||
|
},
|
||||||
|
lampPositionModel: {
|
||||||
|
lampPositionType: ''
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@ -491,6 +506,16 @@ export default {
|
|||||||
this.$emit('updateMapModel', models);
|
this.$emit('updateMapModel', models);
|
||||||
this.$message.success('数据构建成功!');
|
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) {
|
findSection(signal) {
|
||||||
// 01 向左 02 向右
|
// 01 向左 02 向右
|
||||||
|
Loading…
Reference in New Issue
Block a user