显示配置添加清除配置
This commit is contained in:
parent
7e02fa4f1c
commit
13ff4ae7c0
@ -17,9 +17,10 @@
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
<div style="display: table; margin-left: 150px; margin-top: 12px; margin-bottom: 20px;">
|
||||
<el-button type="primary" size="small" @click="generateData">自动生成</el-button>
|
||||
<div style="display: table; margin-left: 120px; margin-top: 12px; margin-bottom: 20px;">
|
||||
<el-button type="primary" size="small" :loading="dataLoading" @click="generateData">自动生成</el-button>
|
||||
<el-button type="primary" size="small" :loading="dataLoading" @click="save">保存</el-button>
|
||||
<el-button type="primary" size="small" :loading="dataLoading" @click="clear">清除</el-button>
|
||||
<el-button type="primary" size="small" @click="back">返回</el-button>
|
||||
</div>
|
||||
</el-scrollbar>
|
||||
@ -123,6 +124,25 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
clear() {
|
||||
this.addModel = {
|
||||
type: 'CENTER',
|
||||
elementList: []
|
||||
};
|
||||
const map = this.$store.state.map.map;
|
||||
const param = {
|
||||
displayList: [...this.otherData],
|
||||
mapId: this.$route.params.mapId
|
||||
};
|
||||
this.dataLoading = true;
|
||||
saveMap(Object.assign(map, param)).then(response => {
|
||||
this.$message.success('保存行调配置成功');
|
||||
this.dataLoading = false;
|
||||
}).catch(() => {
|
||||
this.dataLoading = false;
|
||||
this.$messageBox('保存行调配置失败');
|
||||
});
|
||||
},
|
||||
save() {
|
||||
const map = this.$store.state.map.map;
|
||||
const param = {
|
||||
@ -141,12 +161,12 @@ export default {
|
||||
back() {
|
||||
this.$emit('goDraw');
|
||||
},
|
||||
clear() {
|
||||
this.addModel = {elementList: []};
|
||||
},
|
||||
generateData() {
|
||||
this.loading = true;
|
||||
this.tableData = [];
|
||||
this.addModel = {
|
||||
type: 'CENTER',
|
||||
elementList: []
|
||||
};
|
||||
const station = this.stationList.find(item => item.depot);
|
||||
|
||||
[...this.sectionList, ...this.signalList, ...this.stationStandList, ...this.switchList, ...this.automaticRouteButtonList,
|
||||
|
@ -17,9 +17,10 @@
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
<div style="display: table; margin-left: 150px; margin-top: 12px; margin-bottom: 20px;">
|
||||
<el-button type="primary" size="small" @click="generateData">自动生成</el-button>
|
||||
<div style="display: table; margin-left: 120px; margin-top: 12px; margin-bottom: 20px;">
|
||||
<el-button type="primary" size="small" :loading="dataLoading" @click="generateData">自动生成</el-button>
|
||||
<el-button type="primary" size="small" :loading="dataLoading" @click="save">保存</el-button>
|
||||
<el-button type="primary" size="small" :loading="dataLoading" @click="clear">清除</el-button>
|
||||
<el-button type="primary" size="small" @click="back">返回</el-button>
|
||||
</div>
|
||||
</el-scrollbar>
|
||||
@ -123,6 +124,22 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
clear() {
|
||||
this.addModel = { type: 'DEPOT_IL', elementList: [] };
|
||||
const map = this.$store.state.map.map;
|
||||
const param = {
|
||||
displayList: [...this.otherData],
|
||||
mapId: this.$route.params.mapId
|
||||
};
|
||||
this.dataLoading = true;
|
||||
saveMap(Object.assign(map, param)).then(response => {
|
||||
this.$message.success('保存车辆段配置成功');
|
||||
this.dataLoading = false;
|
||||
}).catch(() => {
|
||||
this.dataLoading = false;
|
||||
this.$messageBox('保存车辆段配置失败');
|
||||
});
|
||||
},
|
||||
save() {
|
||||
const map = this.$store.state.map.map;
|
||||
const param = {
|
||||
@ -141,15 +158,10 @@ export default {
|
||||
back() {
|
||||
this.$emit('goDraw');
|
||||
},
|
||||
|
||||
clear() {
|
||||
this.addModel = { type: 'DEPOT_IL', elementList: [] };
|
||||
},
|
||||
generateData() {
|
||||
this.loading = true;
|
||||
this.clear();
|
||||
this.addModel = { type: 'DEPOT_IL', elementList: [] };
|
||||
const station = this.stationList.find(item => item.depot);
|
||||
console.log(station, station.code);
|
||||
[...this.sectionList, ...this.signalList, ...this.stationStandList, ...this.switchList, ...this.automaticRouteButtonList,
|
||||
...this.axleCounterResetButtonList, ...this.cycleButtonList, ...this.indicatorLightList, ...this.lineList, ...this.outerFrameList,
|
||||
...this.responderList, ...this.tbStrategyList, ...this.tempSpeedLimitList, ...this.textList, ...this.totalGuideLockButtonVOList].forEach(item => {
|
||||
|
Loading…
Reference in New Issue
Block a user