绘图高级数据调整
This commit is contained in:
parent
36ae4e001e
commit
50bb1ad59e
@ -510,7 +510,7 @@ export default {
|
||||
switchId: 'Switch ID',
|
||||
turnBackSectionCode: 'Turn back track ID:',
|
||||
routeTriggerSectionList: 'The approach automatically triggers the segment data:',
|
||||
nearSectionCodeColon: 'Close to extent ID:',
|
||||
nearSectionCodeColon: 'Close to extent ID(CBTC):',
|
||||
|
||||
thenList: 'Then list',
|
||||
startStation: 'Originating station',
|
||||
@ -591,5 +591,19 @@ export default {
|
||||
showConditions: 'Show conditions:',
|
||||
localCenter: 'Local&Center',
|
||||
local: 'Local',
|
||||
center: 'Center'
|
||||
center: 'Center',
|
||||
autoTurnedList: 'Auto turned list',
|
||||
autoTurnedName: 'Auto turned list',
|
||||
reentryRoute: 'Reentry route',
|
||||
basicRoute: 'Basic route',
|
||||
reentrySection: 'Reentry section',
|
||||
reentryRoute2: 'Reentry route 2',
|
||||
basicRoute2: 'Basic route 2',
|
||||
reentrySection2: 'Reentry section 2',
|
||||
setPriority: 'Set priority',
|
||||
associatedStationList: 'Associated station list:',
|
||||
whetherAutoRoute: 'Whether auto route',
|
||||
hostileData: 'Hostile data',
|
||||
routeContinuesToProtectSectorData: 'Route continues to protect sector data',
|
||||
physicalSectionID: 'Physical section id'
|
||||
};
|
||||
|
@ -448,7 +448,7 @@ export default {
|
||||
switchId: '道岔',
|
||||
turnBackSectionCode: '折返轨:',
|
||||
routeTriggerSectionList: '自动追踪接近区段:',
|
||||
nearSectionCodeColon: '接近区段:',
|
||||
nearSectionCodeColon: '接近区段(CBTC):',
|
||||
|
||||
thenList: '交路列表',
|
||||
startStation: '起始站',
|
||||
@ -584,5 +584,19 @@ export default {
|
||||
showConditions: '显示条件:',
|
||||
localCenter: '现地&行调',
|
||||
local: '现地',
|
||||
center: '行调'
|
||||
center: '行调',
|
||||
autoTurnedList: '自动折返列表',
|
||||
autoTurnedName: '自动折返名称',
|
||||
reentryRoute: '折返进路',
|
||||
basicRoute: '基础进路',
|
||||
reentrySection: '折返区段',
|
||||
reentryRoute2: '折返进路2',
|
||||
basicRoute2: '基础进路2',
|
||||
reentrySection2: '折返区段2',
|
||||
setPriority: '设置优先级',
|
||||
associatedStationList: '关联站台列表:',
|
||||
whetherAutoRoute: '是否自定进路',
|
||||
hostileData: '敌对数据',
|
||||
routeContinuesToProtectSectorData: '进路延续保护区段数据',
|
||||
physicalSectionID: '物理区段ID'
|
||||
};
|
||||
|
@ -3,9 +3,9 @@ export function getBaseUrl() {
|
||||
let BASE_API;
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
// BASE_API = 'https://joylink.club/jlcloud';
|
||||
BASE_API = 'https://test.joylink.club/jlcloud';
|
||||
// BASE_API = 'https://test.joylink.club/jlcloud';
|
||||
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪
|
||||
// BASE_API = 'http://192.168.3.6:9000'; // 旭强
|
||||
BASE_API = 'http://192.168.3.6:9000'; // 旭强
|
||||
// BASE_API = 'http://192.168.3.41:9000'; // 张赛
|
||||
// BASE_API = 'http://192.168.3.82:9000'; // 杜康
|
||||
// BASE_API = 'http://b29z135112.zicp.vip';
|
||||
|
@ -98,7 +98,7 @@ export default {
|
||||
width: 180
|
||||
},
|
||||
{
|
||||
title: '编码',
|
||||
title: this.$t('map.code'),
|
||||
prop: 'code',
|
||||
width: 150
|
||||
},
|
||||
@ -115,7 +115,7 @@ export default {
|
||||
|
||||
},
|
||||
{
|
||||
title: '是否自动进路',
|
||||
title: this.$t('map.whetherAutoRoute'),
|
||||
prop: 'flt',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.flt, this.turnBackList, ['value', 'label']); },
|
||||
@ -131,7 +131,7 @@ export default {
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
title: '延续保护',
|
||||
title: this.$t('map.continueProtect'),
|
||||
buttons: [
|
||||
{
|
||||
name: this.$t('map.preview'),
|
||||
@ -173,15 +173,12 @@ export default {
|
||||
]
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
title: this.$t('map.hostileApproachData'),
|
||||
buttons: [
|
||||
{
|
||||
name: this.$t('map.relation'),
|
||||
handleClick: this.conflictingRouteSection,
|
||||
showControl: (row) => { return row.conflictingRouteList.length > 0; }
|
||||
}
|
||||
]
|
||||
title: this.$t('map.hostileData'),
|
||||
prop: 'conflictingSignalList',
|
||||
type: 'tagMore',
|
||||
width: '250',
|
||||
columnValue: (row) => { return this.showConflictingSignalList(row.conflictingSignalList); },
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
@ -200,7 +197,7 @@ export default {
|
||||
showControl: () => { return this.showType !== 'select'; }
|
||||
},
|
||||
{
|
||||
name: '选择',
|
||||
name: this.$t('global.select'),
|
||||
handleClick: this.selectedObj,
|
||||
showControl: () => { return this.showType === 'select'; }
|
||||
}
|
||||
@ -305,7 +302,7 @@ export default {
|
||||
const fieldList = {
|
||||
id: row.id,
|
||||
mapId: this.$route.params.mapId,
|
||||
title: '进路延续保护区段数据',
|
||||
title: this.$t('map.routeContinuesToProtectSectorData'),
|
||||
name: row.name,
|
||||
model: {
|
||||
items: [
|
||||
@ -398,24 +395,6 @@ export default {
|
||||
this.$refs.previewField.doShow(fieldList, row.routeSwitchList);
|
||||
}
|
||||
},
|
||||
async conflictingRouteSection(index, row) { // 敌对进路列表
|
||||
if (this.$refs && this.$refs.previewField && row) {
|
||||
const conflictingRouteList = row.conflictingRouteList.map(elem => { return {code : elem}; });
|
||||
const fieldList = {
|
||||
id: row.id,
|
||||
mapId: this.$route.params.mapId,
|
||||
title: '敌对进路数据',
|
||||
name: row.name,
|
||||
model: {
|
||||
items: [
|
||||
{ prop: 'code', label: '进路code', type: 'text' },
|
||||
{ prop: 'code', label: '进路名称', type: 'select' }
|
||||
]
|
||||
}
|
||||
};
|
||||
this.$refs.related.doShow(fieldList, conflictingRouteList);
|
||||
}
|
||||
},
|
||||
// 保存
|
||||
saveRelated(row) {
|
||||
putRouteNew(row).then(response => {
|
||||
@ -476,6 +455,38 @@ export default {
|
||||
selectedObj(index, row) {
|
||||
this.$emit('setRouteCode', row, this.codeType);
|
||||
this.show = false;
|
||||
},
|
||||
showConflictingSignalList(data) {
|
||||
const nameList = [];
|
||||
data.forEach(ele => {
|
||||
let signalName = '';
|
||||
this.signalList.some(item => {
|
||||
if (item.code === ele.signalCode) {
|
||||
signalName = item.name;
|
||||
return true;
|
||||
}
|
||||
});
|
||||
let switchName = '';
|
||||
ele.switchPositionList.forEach((item, index) => {
|
||||
this.switchList.some(it => {
|
||||
if (it.code === item.switchCode) {
|
||||
const pos = item.normal ? 'N' : 'R';
|
||||
if (index === 0) {
|
||||
switchName = switchName + it.name + pos;
|
||||
} else {
|
||||
switchName = switchName + '/' + it.name + pos;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
});
|
||||
});
|
||||
if (switchName) {
|
||||
nameList.push(signalName + ' ' + 'WITH' + ' ' + switchName);
|
||||
} else {
|
||||
nameList.push(signalName);
|
||||
}
|
||||
});
|
||||
return nameList;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -0,0 +1,342 @@
|
||||
<template>
|
||||
<div style="height: 100%; border: 1px solid #EBEEF5; position: relative; left: 8%; width: 88%">
|
||||
<el-table :data="conflictingSignalList" border style="width: 100%">
|
||||
<el-table-column type="index" label="敌对数据" width="350px">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ handleShowData(scope.$index) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column fixed="right" :label="$t('map.operation')">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click.native.prevent="deleteOverlab(conflictingSignalList, scope.$index)"
|
||||
>
|
||||
移出
|
||||
</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click.native.prevent="editOverlab(conflictingSignalList, scope.$index)"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-card class="box-card" shadow="never">
|
||||
<div slot="header" class="clearfix">
|
||||
<span style="font-size: 12px;">{{ cardTitle }}</span>
|
||||
<el-button v-if="cardMode === 'generate'" style="float: right; padding: 3px 0" type="text" @click="generateOverlab">生成</el-button>
|
||||
<el-button-group v-else-if=" cardMode === 'edit'" style="float: right;">
|
||||
<el-button type="text" style="padding:3px 3px" @click="updateOverlab">修改</el-button>
|
||||
<el-button type="text" style="padding:3px 0" @click="cancelOverlab">取消</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
<div>
|
||||
<el-form ref="hostileForm" :model="addHostileModel" :rules="hostileRules" label-width="135px" size="mini" style="margin-top: 15px">
|
||||
<el-form-item label="敌对信号:" prop="signalCode">
|
||||
<el-select v-model="addHostileModel.signalCode" clearable :filterable="true">
|
||||
<el-option
|
||||
v-for="item in signalList"
|
||||
:key="item.code"
|
||||
:label="item.name + ' (' + item.code+ ')'"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
<el-button
|
||||
:type=" field === 'hostileSignal' ? 'danger' : 'primary'"
|
||||
@click="hover('hostileSignal')"
|
||||
>{{ $t('map.activate') }}</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item label="敌对道岔:" prop="switchPositionList">
|
||||
<el-select v-model="hostileSwitchCode" clearable :filterable="true" :placeholder="$t('map.pleaseSelect')">
|
||||
<el-option
|
||||
v-for="item in switchList"
|
||||
:key="item.code"
|
||||
:label="`${item.name}(${item.code})`"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
<el-button
|
||||
:type=" field === 'switchPositionList' ? 'danger' : 'primary'"
|
||||
@click="hover('switchPositionList')"
|
||||
>{{ $t('map.activate') }}</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="pushSwitch(addHostileModel.switchPositionList, {switchCode: hostileSwitchCode, normal: hostileSwitchType, switchType: hostileSwitchType ? '定位' : '反位'})"
|
||||
>{{ $t('map.add') }}
|
||||
</el-button>
|
||||
<el-select v-model="hostileSwitchType" :filterable="true" :placeholder="$t('map.pleaseSelect')">
|
||||
<el-option
|
||||
v-for="item in SwitchLocateTypeList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
<el-table :data="addHostileModel.switchPositionList" border style="width: 97%">
|
||||
<el-table-column prop="switchCode" :label="$t('map.switchId')" width="100">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ swictchName(scope.row.switchCode) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="switchType" :label="$t('map.switchType')" />
|
||||
<el-table-column fixed="right" :label="$t('map.operation')" width="50">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click.native.prevent="deleteSwitch(addHostileModel.switchPositionList, scope.$index)"
|
||||
>
|
||||
{{ $t('map.remove') }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { ViewMode } from '@/scripts/ConstDic';
|
||||
import { deepAssign } from '@/utils/index';
|
||||
|
||||
export default {
|
||||
name: 'HostileData',
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
},
|
||||
mapInfo: {
|
||||
type: Object,
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
},
|
||||
conflictingSignalList: {
|
||||
type: Object,
|
||||
default() {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
ViewMode: ViewMode,
|
||||
field: '',
|
||||
hostileSwitchCode: '',
|
||||
isSave: true,
|
||||
editModel: {},
|
||||
addModel: {
|
||||
conflictingSignalList: []
|
||||
},
|
||||
addHostileModel: {
|
||||
parentIndex: '',
|
||||
signalCode: '', // 敌对信号
|
||||
switchPositionList: [] // 进路延续保护道岔数据列表
|
||||
},
|
||||
hostileSwitchType: '',
|
||||
SwitchLocateTypeList: [
|
||||
{ name: '定位', code: true },
|
||||
{ name: '反位', code: false }
|
||||
],
|
||||
editShow: false,
|
||||
hostileRules: {
|
||||
|
||||
},
|
||||
cardMode: 'generate'
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'switchList',
|
||||
'signalList'
|
||||
]),
|
||||
cardTitle() {
|
||||
if (this.cardMode === 'generate') {
|
||||
return '生成敌对数据';
|
||||
} else if (this.cardMode === 'edit') {
|
||||
return '编辑敌对数据';
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
mapInfo(val) {
|
||||
if (val) {
|
||||
this.addModel.mapId = val.id;
|
||||
}
|
||||
},
|
||||
conflictingSignalList(val, old) {
|
||||
if (val) {
|
||||
this.conflictingSignalList && this.conflictingSignalList.forEach(item => {
|
||||
item.switchPositionList.length && item.switchPositionList.forEach( ele => {
|
||||
ele.switchType = ele.normal ? '定位' : '反位';
|
||||
});
|
||||
});
|
||||
this.editShow = true;
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
hover(field) {
|
||||
this.$emit('hover', field);
|
||||
},
|
||||
setField(field) {
|
||||
this.field = field;
|
||||
},
|
||||
handleShowData(index) {
|
||||
let signalName = '';
|
||||
this.signalList.some(item => {
|
||||
if (item.code === this.conflictingSignalList[index].signalCode) {
|
||||
signalName = item.name;
|
||||
return true;
|
||||
}
|
||||
});
|
||||
let switchName = '';
|
||||
this.conflictingSignalList[index].switchPositionList.forEach((item, index) => {
|
||||
this.switchList.some(it => {
|
||||
if (it.code === item.switchCode) {
|
||||
const pos = item.normal ? 'N' : 'R';
|
||||
if (index === 0) {
|
||||
switchName = switchName + it.name + pos;
|
||||
} else {
|
||||
switchName = switchName + '/' + it.name + pos;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
});
|
||||
});
|
||||
if (switchName) {
|
||||
return signalName + ' ' + 'WITH' + ' ' + switchName;
|
||||
} else {
|
||||
return signalName;
|
||||
}
|
||||
},
|
||||
pushSwitch(list, data) {
|
||||
const index = list.findIndex(elem => { return elem.switchCode == data.switchCode; });
|
||||
if (index < 0) {
|
||||
list.push(data);
|
||||
} else {
|
||||
this.$messageBox(this.$t('tip.routeSameID'));
|
||||
}
|
||||
},
|
||||
deleteSwitch(list, index) {
|
||||
list.splice(index, 1);
|
||||
},
|
||||
swictchName(code) {
|
||||
let name = '';
|
||||
if (code) {
|
||||
const swch = this.$store.getters['map/getDeviceByCode'](code);
|
||||
if (swch) {
|
||||
name = `${swch.name}(${swch.code})`;
|
||||
}
|
||||
}
|
||||
return name;
|
||||
},
|
||||
setHostileSignal(code) {
|
||||
this.addHostileModel.signalCode = code;
|
||||
},
|
||||
clear() {
|
||||
if (this.$refs && this.$refs.form) {
|
||||
this.$refs.form.resetFields();
|
||||
this.isSave = true;
|
||||
this.cardMode = 'generate';
|
||||
this.clearHostile();
|
||||
}
|
||||
},
|
||||
deleteOverlab(list, index) {
|
||||
list.splice(index, 1);
|
||||
this.$refs.hostileForm.resetFields();
|
||||
this.clearHostile();
|
||||
this.cardMode = 'generate';
|
||||
},
|
||||
editOverlab(list, index) {
|
||||
this.addHostileModel = deepAssign({}, list[index]);
|
||||
this.addHostileModel.parentIndex = index;
|
||||
this.cardMode = 'edit';
|
||||
},
|
||||
updateOverlab() {
|
||||
if (this.addHostileModel.parentIndex || this.addHostileModel.parentIndex === 0 ) {
|
||||
if (!this.addHostileModel.signalCode.length) {
|
||||
this.$messageBox('请选择敌对信号!');
|
||||
} else {
|
||||
this.conflictingSignalList[this.addHostileModel.parentIndex] = {
|
||||
signalCode:this.addHostileModel.signalCode,
|
||||
switchPositionList:this.addHostileModel.switchPositionList
|
||||
};
|
||||
}
|
||||
this.clearHostile();
|
||||
this.cardMode = 'generate';
|
||||
}
|
||||
},
|
||||
cancelOverlab() {
|
||||
this.clearHostile();
|
||||
this.cardMode = 'generate';
|
||||
},
|
||||
generateOverlab() {
|
||||
if (!this.addHostileModel.signalCode.length) {
|
||||
this.$messageBox('请选择敌对信号!');
|
||||
} else {
|
||||
this.conflictingSignalList.push({
|
||||
signalCode:this.addHostileModel.signalCode,
|
||||
switchPositionList:this.addHostileModel.switchPositionList
|
||||
});
|
||||
this.$refs.hostileForm.resetFields();
|
||||
this.clearHostile();
|
||||
}
|
||||
},
|
||||
clearHostile() {
|
||||
this.addHostileModel = {
|
||||
parentIndex: '',
|
||||
signalCode: '',
|
||||
switchPositionList:[]
|
||||
};
|
||||
this.hostileSwitchCode = '';
|
||||
this.hostileSwitchType = '';
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
/deep/ .el-radio {
|
||||
margin-right: 10px;
|
||||
}
|
||||
/deep/ {
|
||||
.el-select .el-tag {
|
||||
height: auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding-right: 15px;
|
||||
box-sizing: border-box;
|
||||
white-space: normal;
|
||||
}
|
||||
.el-input__suffix{
|
||||
right: 2px;
|
||||
}
|
||||
.el-card__header{
|
||||
border-bottom: 1px solid #EBEEF5;
|
||||
border-top: 1px solid #EBEEF5;
|
||||
}
|
||||
.el-card{
|
||||
border:0 solid #EBEEF5;
|
||||
|
||||
}
|
||||
}
|
||||
.box-card {
|
||||
position: relative;
|
||||
}
|
||||
</style>
|
@ -161,7 +161,7 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-form-item>
|
||||
<el-form-item label="关联站台列表:" prop="stationStandList">
|
||||
<el-form-item :label="$t('map.associatedStationList')" prop="stationStandList">
|
||||
<el-select v-model="addModel.stationStandList" multiple clearable filterable style="width: 220px;">
|
||||
<el-option
|
||||
v-for="item in stationStandList"
|
||||
@ -175,17 +175,9 @@
|
||||
@click="hover('routeStationStandList')"
|
||||
>{{ $t('map.activate') }}</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('map.hostileApproachData') + ':'" prop="conflictingRouteList">
|
||||
<el-select v-model="addModel.conflictingRouteList" multiple clearable filterable>
|
||||
<el-option
|
||||
v-for="item in routeList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<hostile-data ref="hostile" :conflicting-signal-list="addModel.conflictingSignalList" @hover="hover" />
|
||||
<br>
|
||||
<protect-operate ref="protect" :protect-data="protectData" @saveProtectSuccess="saveProtectSuccess" @updateProtectSuccess="updateProtectSuccess" @clearHover="clearHover" />
|
||||
<div class="draft">
|
||||
<el-button-group>
|
||||
@ -195,21 +187,20 @@
|
||||
</el-button-group>
|
||||
</div>
|
||||
</el-scrollbar>
|
||||
<route-detail ref="routeDetail" :map-info="mapInfo" @setRouteCode="setRouteCode" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { setUID } from '@/jmapNew/utils/Uid';
|
||||
import { postRouteNew, putRouteNew, getRouteNewList, getContinueProtectList } from '@/api/jmap/mapdraft';
|
||||
import RouteDetail from './detail';
|
||||
import ProtectOperate from './protect';
|
||||
import HostileData from './hostileData';
|
||||
|
||||
export default {
|
||||
name: 'RouteOperation',
|
||||
components: {
|
||||
RouteDetail,
|
||||
ProtectOperate
|
||||
ProtectOperate,
|
||||
HostileData
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
@ -263,7 +254,7 @@ export default {
|
||||
routeFlankProtectionList: [], // 进路侧防道岔列表
|
||||
stationStandList: [], // 站台数据列表
|
||||
overlapCode:'',
|
||||
conflictingRouteList: [] // 敌对进路
|
||||
conflictingSignalList: [] // 敌对信号数据列表
|
||||
},
|
||||
protectData:null,
|
||||
routeList: [] // 进路列表
|
||||
@ -405,6 +396,7 @@ export default {
|
||||
hover(field) {
|
||||
this.field = field === this.field ? '' : field;
|
||||
this.$refs.protect.hover('');
|
||||
this.$refs.hostile.setField(field);
|
||||
},
|
||||
clearHover() {
|
||||
this.field = '';
|
||||
@ -421,7 +413,6 @@ export default {
|
||||
list.splice(index, 1);
|
||||
},
|
||||
buildModel(overlapCode, code) {
|
||||
console.log(this.addModel, '=======');
|
||||
const model = Object.assign({}, this.addModel);
|
||||
model['mapId'] = this.mapInfo.id;
|
||||
if (code) { model['code'] = code; }
|
||||
@ -436,7 +427,7 @@ export default {
|
||||
if (valid) {
|
||||
this.loading = true;
|
||||
postRouteNew(this.buildModel(overlapCode, setUID('Route'))).then(response => {
|
||||
this.$message.success('创建成功');
|
||||
this.$message.success(this.$t('tip.creatingSuccessful'));
|
||||
this.loading = false;
|
||||
this.routeList.push(this.buildModel(setUID('Route')));
|
||||
this.clear();
|
||||
@ -475,20 +466,13 @@ export default {
|
||||
this.addModel.routeFlankProtectionList = [];
|
||||
this.addModel.overlapCode = '';
|
||||
this.addModel.code = '';
|
||||
this.addModel.conflictingSignalList = [];
|
||||
this.isSave = true;
|
||||
this.$refs.protect.clear();
|
||||
this.addModel.stationCode = this.routeList[this.routeList.length - 1].stationCode;
|
||||
this.addModel.delayReleaseTime = this.routeList[this.routeList.length - 1].delayReleaseTime;
|
||||
}
|
||||
},
|
||||
selectedConflictingRouteList() {
|
||||
this.$refs.routeDetail.doShow('select');
|
||||
},
|
||||
setRouteCode(data) {
|
||||
if (this.addModel.conflictingRouteList.indexOf(data.code) === -1) {
|
||||
this.addModel.conflictingRouteList.push(data.code);
|
||||
}
|
||||
},
|
||||
initProtectData(val) {
|
||||
const param = {
|
||||
code: val.overlapCode,
|
||||
@ -547,6 +531,10 @@ export default {
|
||||
if (this.addModel.stationStandList.indexOf(selected.code) === -1) {
|
||||
this.addModel.stationStandList.push(selected.code);
|
||||
}
|
||||
} else if (selected._type.toUpperCase() === 'Signal'.toUpperCase() && this.field.toUpperCase() === 'hostileSignal'.toUpperCase()) {
|
||||
this.$refs.hostile.setHostileSignal(selected.code);
|
||||
} else if (selected._type.toUpperCase() === 'Switch'.toUpperCase() && this.field.toUpperCase() === 'switchPositionList'.toUpperCase()) {
|
||||
this.$refs.hostile.hostileSwitchCode = selected.code;
|
||||
} else {
|
||||
this.$refs.protect.setSelected(selected);
|
||||
}
|
||||
|
@ -54,7 +54,8 @@ export default {
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('map.signalCodeName'),
|
||||
prop: 'signalCode'
|
||||
prop: 'signalCode',
|
||||
width: '120'
|
||||
},
|
||||
{
|
||||
title: this.$t('map.nearSectionCodeColon'),
|
||||
@ -63,6 +64,21 @@ export default {
|
||||
columnValue: (row) => { return this.$convertField(row.routeSectionList, this.sectionList, ['code', 'name'], true); },
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
{
|
||||
title: '接近区段(后备)',
|
||||
prop: 'blockSectionList',
|
||||
type: 'tagMore',
|
||||
columnValue: (row) => { return this.$convertField(row.blockSectionList || [], this.sectionList, ['code', 'name'], true); },
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
{
|
||||
title: '是否是引导信号机',
|
||||
prop: 'callOn',
|
||||
type: 'tag',
|
||||
width: '80',
|
||||
columnValue: (row) => { return row.callOn ? '是' : '否'; },
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
title: this.$t('map.operation'),
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div style="height: 100%;">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||
<el-form ref="form" :model="addModel" :rules="rules" label-width="120px" size="mini">
|
||||
<el-form ref="form" :model="addModel" :rules="rules" label-width="140px" size="mini">
|
||||
<div class="definition">
|
||||
<el-form-item :label="$t('map.signalID')" prop="signalCode">
|
||||
<el-select v-model="addModel.signalCode" clearable :filterable="true">
|
||||
@ -29,6 +29,25 @@
|
||||
@click="hover('routeSectionList')"
|
||||
>{{ $t('map.activate') }}</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item label="接近区段(后备):" prop="blockSectionList">
|
||||
<el-select v-model="addModel.blockSectionList" multiple clearable :filterable="true">
|
||||
<el-option
|
||||
v-for="item in sectionList"
|
||||
:key="item.code"
|
||||
:label="item.name + ' (' + item.code+ ')'"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
<el-button
|
||||
:type=" field === 'blockSectionList' ? 'danger': 'primary'"
|
||||
@click="hover('blockSectionList')"
|
||||
>
|
||||
{{ $t('map.activate') }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否引导信号机:" prop="callOn">
|
||||
<el-checkbox v-model="addModel.callOn" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button-group>
|
||||
<el-button v-if="isSave" type="primary" size="small" :loading="loading" @click="save">{{ $t('map.save') }}
|
||||
@ -48,6 +67,7 @@ import { setUID } from '@/jmapNew/utils/Uid';
|
||||
import { postApproachSection, putApproachSection, getApproachSectionList } from '@/api/jmap/mapdraft';
|
||||
import { ViewMode } from '@/scripts/ConstDic';
|
||||
import { formatName } from '@/utils/runPlan';
|
||||
import { deepAssign } from '@/utils/index';
|
||||
|
||||
export default {
|
||||
name: 'RouteOperation',
|
||||
@ -83,7 +103,9 @@ export default {
|
||||
code: '',
|
||||
mapId: '',
|
||||
signalCode: '',
|
||||
routeSectionList: []
|
||||
routeSectionList: [],
|
||||
blockSectionList: [],
|
||||
callOn: true
|
||||
},
|
||||
rules: {
|
||||
signalCode: [
|
||||
@ -91,6 +113,9 @@ export default {
|
||||
],
|
||||
routeSectionList: [
|
||||
{ required: true, message: this.$t('map.triggerSegmentData'), trigger: 'change' }
|
||||
],
|
||||
blockSectionList: [
|
||||
{ required: true, message: '请选择接近区段(后备)!', trigger: 'change'}
|
||||
]
|
||||
}
|
||||
};
|
||||
@ -112,7 +137,7 @@ export default {
|
||||
},
|
||||
routeData(val, old) {
|
||||
if (val) {
|
||||
this.addModel = val;
|
||||
this.addModel = deepAssign(this.addModel, val);
|
||||
}
|
||||
},
|
||||
newRouteSectionList: {
|
||||
@ -164,6 +189,7 @@ export default {
|
||||
this.addModel.code = '';
|
||||
this.addModel.mapId = '';
|
||||
this.addModel.routeSectionList = [];
|
||||
this.addModel.blockSectionList = [];
|
||||
this.isSave = true;
|
||||
}
|
||||
}).catch(error=> {
|
||||
@ -175,10 +201,15 @@ export default {
|
||||
if (selected) {
|
||||
if (selected._type.toUpperCase() === 'Signal'.toUpperCase() && this.field.toUpperCase() === 'signalCode'.toUpperCase()) {
|
||||
this.addModel.signalCode = selected.code;
|
||||
this.addModel.callOn = !selected.virtual;
|
||||
} else if (selected._type.toUpperCase() === 'Section'.toUpperCase() && this.field.toUpperCase() === 'routeSectionList'.toUpperCase()) {
|
||||
if ((selected.type === '01' || selected.type === '03' || selected.type === '02') && this.addModel.routeSectionList.indexOf(selected.code) === -1) {
|
||||
this.addModel.routeSectionList.push(selected.code);
|
||||
}
|
||||
} else if (selected._type.toUpperCase() === 'Section'.toUpperCase() && this.field.toUpperCase() === 'blockSectionList'.toUpperCase()) {
|
||||
if ((selected.type === '01' || selected.type === '03') && this.addModel.blockSectionList.indexOf(selected.code) === -1) {
|
||||
this.addModel.blockSectionList.push(selected.code);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -224,6 +255,7 @@ export default {
|
||||
this.$refs.form.resetFields();
|
||||
this.addModel.mapId = this.mapInfo.id;
|
||||
this.addModel.routeSectionList = [];
|
||||
this.addModel.blockSectionList = [];
|
||||
this.addModel.signalCode = '';
|
||||
this.addModel.code = '';
|
||||
this.isSave = true;
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag title="自动折返列表" :visible.sync="show" width="85%" :before-do-close="doClose">
|
||||
<el-dialog v-dialogDrag :title="$t('map.autoTurnedList')" :visible.sync="show" width="85%" :before-do-close="doClose">
|
||||
<div>
|
||||
<QueryListPage
|
||||
ref="queryListPage"
|
||||
@ -38,7 +38,7 @@ export default {
|
||||
queryObject: {
|
||||
name: {
|
||||
type: 'text',
|
||||
label: '自动折返名称'
|
||||
label: this.$t('map.autoTurnedName')
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -49,25 +49,37 @@ export default {
|
||||
indexShow: true,
|
||||
columns: [
|
||||
{
|
||||
title: '自动折返名称',
|
||||
title: this.$t('map.autoTurnedName'),
|
||||
prop: 'name'
|
||||
},
|
||||
{
|
||||
title: '所属车站',
|
||||
title: this.$t('map.routeStationName'),
|
||||
prop: 'stationCode'
|
||||
},
|
||||
{
|
||||
title: '折返进路',
|
||||
title: this.$t('map.reentryRoute'),
|
||||
prop: 'turnBackRouteCode'
|
||||
},
|
||||
{
|
||||
title: '基础进路',
|
||||
title: this.$t('map.basicRoute'),
|
||||
prop: 'basicRouteCode'
|
||||
},
|
||||
{
|
||||
title: '折返区段',
|
||||
title: this.$t('map.reentrySection'),
|
||||
prop: 'reentryTrackCode'
|
||||
},
|
||||
{
|
||||
title: this.$t('map.reentryRoute2'),
|
||||
prop: 'turnBackRoute2Code'
|
||||
},
|
||||
{
|
||||
title: this.$t('map.basicRoute2'),
|
||||
prop: 'basicRoute2Code'
|
||||
},
|
||||
{
|
||||
title: this.$t('map.reentrySection2'),
|
||||
prop: 'reentryTrack2Code'
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
title: this.$t('map.operation'),
|
||||
@ -86,7 +98,7 @@ export default {
|
||||
}
|
||||
],
|
||||
actions: [
|
||||
{ text: '设置优先级', handler: this.setPriority }
|
||||
{ text: this.$t('map.setPriority'), handler: this.setPriority }
|
||||
]
|
||||
}
|
||||
};
|
||||
@ -123,8 +135,8 @@ export default {
|
||||
if (list) {
|
||||
list.map(elem => {
|
||||
that.$convertSpecifiedField(elem, that.stationList, 'code', 'name', ['stationCode']);
|
||||
that.$convertSpecifiedField(elem, that.sectionList, 'code', 'name', ['reentryTrackCode']);
|
||||
that.$convertSpecifiedField(elem, that.routeList, 'code', 'name', ['turnBackRouteCode', 'basicRouteCode']);
|
||||
that.$convertSpecifiedField(elem, that.sectionList, 'code', 'name', ['reentryTrackCode', 'reentryTrack2Code']);
|
||||
that.$convertSpecifiedField(elem, that.routeList, 'code', 'name', ['turnBackRouteCode', 'basicRouteCode', 'turnBackRoute2Code', 'basicRoute2Code']);
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -153,7 +165,7 @@ export default {
|
||||
this.queryList.reload();
|
||||
}
|
||||
},
|
||||
getRouteList() {
|
||||
async getRouteList() {
|
||||
getRouteNewList(this.$route.params.mapId, {pageSize:9999, pageNum:1}).then((resp) => {
|
||||
this.routeList = resp.data.list;
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user