desc: 修改国际化,调整角色显示

This commit is contained in:
zyy 2019-08-14 15:03:41 +08:00
parent 9a4e982c08
commit 3dd56879a4
21 changed files with 304 additions and 217 deletions

View File

@ -13,6 +13,8 @@ export default {
mixedView: '混合视图',
normal: '正常',
add: '添加',
are: '是',
deny: '否',
save: '保存',
updata: '更新',
@ -21,6 +23,8 @@ export default {
saveAs: '另存为',
publish: '发布',
deleteObj: '删除',
remove: '移除',
lastStep: '上一步',
confirm: '确 定',
cancel: '取 消',
cancelledDelete: '已取消删除',
@ -361,4 +365,68 @@ export default {
zcCodeColon: '编码:',
showZc: '是否可见:',
pathUnitList: '路径单元列表',
startSectionCode: '始端停车点',
endSectionCode: '终端停车点',
pathUnitCode: '路径单元code',
pathUnitMapName: '所属地图名称',
orderNum: '优先级',
pathName: '进路名称',
affiliationStationCode: '所属车站名称',
startingSignalName: '始端信号机名称',
endingSignalName: '终端信号机名称',
routeID: '进路ID',
routeName: '进路名称:',
routeMapId: '所属地图名称',
routeStationName: '所属车站名称',
routeStartSignalCode: '始端信号机名称',
routeEndSignalCode: '终端信号机名称',
startSectionCodeColon: '始端停车点:',
endSectionCodeColon: '终端停车点:',
routePreview: '进路预览',
accessType: '进路性质类型',
automaticAccessType: '自动进路类型',
nearSectionCode: '接近区段名称',
continueProtectSwitchData: '延续保护道岔数据',
accessSideTurnoutData: '进路侧防道岔数据',
turnBackRailName: '折返轨名称',
routeSegmentData: '进路自动触发区段数据',
routeProtectsData: '进路延续保护区段数据',
accessPhysical: '进路物理区段数据',
routeAccessScreenData: '进路屏蔽门数据',
routeAccessTurnoutData: '进路道岔数据',
hostileApproachData: '敌对进路数据',
relation: '关系',
associatedRoute: '关联进路:',
associatedHostileRecord: '关联敌对记录',
routeArc: '是否自动追踪/联锁自动触发:',
routeFlt: '是否车队/联锁自动进路:',
delayUnlockingTime: '延时解锁时间:',
accessTypeColon: '进路性质类型:',
automaticAccessTypeColon: '自动进路类型:',
startSignalId: '始端信号机ID:',
endSignalId: '终端信号机ID:',
switchType: '道岔类型',
switchId: '道岔ID',
accessSwitchList: '进路道岔数据:',
accessStandList: '进路屏蔽门数据:',
accessSectionList: '进路物理区段数据:',
turnBackSectionCode: '折返轨ID:',
routeFlankProtectionList: '侧防道岔数据:',
routeOverlapSwitchList: '延续保护道岔数据:',
routeOverlapSectionList: '进路延续保护区段数据:',
routeTriggerSectionList: '进路自动触发区段数据:',
nearSectionCodeColon: '接近区段ID:',
thenList: '交路列表',
startStation: '起始站',
endStation: '终到站',
};

View File

@ -126,5 +126,13 @@ export default {
trainWindowSectionCode: '请输入关联区段',
visible: '请选择是否可见',
pleaseSelectStartSignal: '请选择开始信号机',
pleaseSelectEndSignal: '请选择结束信号机',
pleaseEnterPathName: '请输入进路名称',
proximitySection: '请选择接近区段',
accessPropertyType: '请选择进路性质类型',
autoAccessType: '请选择自动进路类型',
physicalSegmentData: '请选择进路物理区段数据',
};

View File

@ -9,9 +9,12 @@ export default {
cancelGeneration: '已取消批量生成',
updateSuccessfully: '更新成功',
saveSuccessfully: '保存成功',
updateFailed: '更新失败',
successfullyDelete: '删除成功',
failDelete: '删除失败',
operationAbnormal: '操作异常',
createSuccess: '创建成功',
cannotCoincide: '起始坐标和结束坐标不能重合',
cannotMerged: '存在非物理区段,不能合并',
@ -26,5 +29,8 @@ export default {
stationFont: '车站字体',
kilometerFont: '公里标字体',
meter: '米',
angle: '度'
angle: '度',
pleaseEnterNameQuery: '请输入名称查询',
routeSameID: '相同ID的数据已存在'
};

View File

@ -44,14 +44,14 @@
</div> -->
<div class="display-draft">
<el-button-group>
<el-button v-if="this.$store.state.map.roles == 'Driver'" type="jumpjlmap3d" @click="jumpjlmap3d">司机视角</el-button>
<el-button v-if="userRole == 'Driver'" type="jumpjlmap3d" @click="jumpjlmap3d">司机视角</el-button>
<el-button
v-if="this.$store.state.map.roles == 'Admin'"
v-if="userRole == 'Admin'"
type="success"
:disabled="isDisable"
@click="selectBeginTime"
>按计划行车</el-button>
<el-button v-if="this.$store.state.map.roles == 'Admin'" type="danger" :disabled="!isDisable" @click="end">
<el-button v-if="userRole == 'Admin'" type="danger" :disabled="!isDisable" @click="end">
退出计划</el-button>
<el-button type="primary" @click="back">返回</el-button>
</el-button-group>

View File

@ -189,9 +189,9 @@ export default {
]
};
//
this.$nextTick(function () {
this.$refs.dataform.clearValidate();
});
// this.$nextTick(function () {
// this.$refs.dataform.clearValidate();
// });
return rules;
},

View File

@ -401,9 +401,9 @@ export default {
]
};
//
this.$nextTick(function () {
this.$refs.dataform.clearValidate();
});
// this.$nextTick(function () {
// this.$refs.dataform.clearValidate();
// });
return rules;
},

View File

@ -262,9 +262,9 @@ export default {
]
};
//
this.$nextTick(function () {
this.$refs.dataform.clearValidate();
});
// this.$nextTick(function () {
// this.$refs.dataform.clearValidate();
// });
return rules;
}

View File

@ -143,9 +143,9 @@ export default {
]
};
//
this.$nextTick(function () {
this.$refs.dataform.clearValidate();
});
// this.$nextTick(function () {
// this.$refs.dataform.clearValidate();
// });
return rules;
},

View File

@ -134,9 +134,9 @@ export default {
]
};
//
this.$nextTick(function () {
this.$refs.dataform.clearValidate();
});
// this.$nextTick(function () {
// this.$refs.dataform.clearValidate();
// });
return rules;
}

View File

@ -173,9 +173,9 @@ export default {
]
};
//
this.$nextTick(function () {
this.$refs.dataform.clearValidate();
});
// this.$nextTick(function () {
// this.$refs.dataform.clearValidate();
// });
return rules;
},

View File

@ -142,9 +142,9 @@ export default {
]
};
//
this.$nextTick(function () {
this.$refs.dataform.clearValidate();
});
// this.$nextTick(function () {
// this.$refs.dataform.clearValidate();
// });
return rules;
},

View File

@ -1,5 +1,5 @@
<template>
<el-dialog title="路径单元列表" :visible.sync="show" width="85%" :before-do-close="doClose">
<el-dialog :title="$t('map.pathUnitList')" :visible.sync="show" width="85%" :before-do-close="doClose">
<div>
<QueryListPage
ref="queryListPage"
@ -39,14 +39,14 @@ export default {
queryObject: {
startSectionCode: {
type: 'select',
label: '始端停车点名',
label: this.$t('map.startSectionCode'),
config: {
data: []
}
},
endSectionCode: {
type: 'select',
label: '终端停车点名',
label: this.$t('map.endSectionCode'),
config: {
data: []
}
@ -60,37 +60,37 @@ export default {
indexShow: true,
columns: [
{
title: '路径单元code',
title: this.$t('map.pathUnitCode'),
prop: 'code'
},
{
title: '所属地图名称',
title: this.$t('map.pathUnitMapName'),
prop: 'mapId'
},
{
title: '起始停车点',
title: this.$t('map.startSectionCode'),
prop: 'startSectionCode'
},
{
title: '终端停车点',
title: this.$t('map.endSectionCode'),
prop: 'endSectionCode'
},
{
title: '优先级',
title: this.$t('map.orderNum'),
prop: 'orderNum'
},
{
type: 'button',
title: '操作',
title: this.$t('map.operation'),
width: '200',
buttons: [
{
name: '编辑',
name: this.$t('map.compile'),
handleClick: this.editObj
},
{
name: '删除',
name: this.$t('map.deleteObj'),
handleClick: this.deleteObj,
type: 'danger'
}
@ -190,10 +190,10 @@ export default {
if (this.mapInfo && this.mapInfo.id && row) {
//
delRouteUnit(row.id).then(response => {
this.$message.success('删除成功');
this.$message.success(this.$t('tip.successfullyDelete'));
this.reloadTable();
}).catch(() => {
this.$messageBox('删除失败');
this.$messageBox(this.$t('tip.failDelete'));
});
}
},

View File

@ -4,14 +4,14 @@
<el-card>
<div slot="header" class="clearfix">
<span>
地图名称
{{ $t('map.mapName') }}
<b>{{ mapInfo.name }}</b>
</span>
<el-button type="text" style="float: right; padding: 3px 3px" @click="previewRouteEvent">预览</el-button>
<el-button type="text" style="float: right; padding: 3px 3px" @click="createRouteEvent">新建</el-button>
<el-button type="text" style="float: right; padding: 3px 3px" @click="previewRouteEvent">{{ $t('map.preview') }}</el-button>
<el-button type="text" style="float: right; padding: 3px 3px" @click="createRouteEvent">{{ $t('map.newConstruction') }}</el-button>
</div>
<el-tabs v-model="enabledTab" type="card">
<el-tab-pane label="路径单元" name="Route">
<el-tab-pane :label="$t('map.pathUnit')" name="Route">
<route-draft
ref="routeEdit"
:selected="selected"

View File

@ -1,5 +1,5 @@
<template>
<el-dialog title="路径单元列表" :visible.sync="show" width="85%" :before-do-close="doClose">
<el-dialog :title="$t('map.pathUnitList')" :visible.sync="show" width="85%" :before-do-close="doClose">
<div>
<QueryListPage
ref="queryListPage"
@ -38,28 +38,28 @@ export default {
queryObject: {
name: {
type: 'select',
label: '进路名称',
label: this.$t('map.pathName'),
config: {
data: []
}
},
stationCode: {
type: 'select',
label: '所属车站名称',
label: this.$t('map.affiliationStationCode'),
config: {
data: []
}
},
startSignalCode: {
type: 'select',
label: '始端信号机名称',
label: this.$t('map.startingSignalName'),
config: {
data: []
}
},
endSignalCode: {
type: 'select',
label: '终端信号机名称',
label: this.$t('map.endingSignalName'),
config: {
data: []
}
@ -73,36 +73,36 @@ export default {
indexShow: true,
columns: [
{
title: '进路ID',
title: this.$t('map.routeID'),
prop: 'code'
},
{
title: '进路名称',
title: this.$t('map.pathName'),
prop: 'name'
},
{
title: '所属地图名称',
title: this.$t('map.routeMapId'),
prop: 'mapId'
},
{
title: '所属车站名称',
title: this.$t('map.routeStationName'),
prop: 'stationCode'
},
{
title: '始端信号机名称',
title: this.$t('map.routeStartSignalCode'),
prop: 'startSignalCode'
},
{
title: '终端信号机名称',
title: this.$t('map.routeEndSignalCode'),
prop: 'endSignalCode'
},
{
type: 'button',
title: '操作',
title: this.$t('map.operation'),
width: '200',
buttons: [
{
name: '添加',
name: this.$t('map.add'),
handleClick: this.addObj
}
]

View File

@ -8,7 +8,7 @@
<el-step title="路径单元整合" icon="el-icon-setting" />
</el-steps>
<div v-show="display == 1" class="definition">
<el-form-item label="始端停车点:" prop="startSectionCode">
<el-form-item :label="$t('map.startSectionCodeColon')" prop="startSectionCode">
<el-select v-model="addModel.startSectionCode" clearable :filterable="true">
<el-option
v-for="item in filterSectionList"
@ -21,9 +21,9 @@
<el-button
:type=" field === 'startSectionCode' ? 'danger' : 'primary'"
@click="hover('startSectionCode')"
>激活</el-button>
>{{ $t('map.activate') }}</el-button>
</el-form-item>
<el-form-item label="终端停车点:" prop="endSectionCode">
<el-form-item :label="$t('map.endSectionCodeColon')" prop="endSectionCode">
<el-select v-model="addModel.endSectionCode" clearable :filterable="true">
<el-option
v-for="item in filterSectionList"
@ -35,7 +35,7 @@
<el-button
:type=" field === 'endSectionCode' ? 'danger' : 'primary'"
@click="hover('endSectionCode')"
>激活</el-button>
>{{ $t('map.activate') }}</el-button>
</el-form-item>
<el-form-item>
<el-button-group>
@ -50,7 +50,7 @@
size="small"
style="float: right; margin-right: 20px; margin-bottom: 10px;"
@click="pushSwitch"
>添加</el-button>
>{{ $t('map.add') }}</el-button>
<el-table
:data="addModel.mapRouteUnitRelList"
row-key="id"
@ -60,21 +60,21 @@
<el-table-column type="index" />
<el-table-column prop="routeCode" label="进路ID" />
<el-table-column prop="routeName" label="进路名称" />
<el-table-column fixed="right" label="操作" width="50">
<el-table-column fixed="right" :label="$t('map.operation')" width="50">
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click.native.prevent="deletePathUnit(scope.$index, addModel.mapRouteUnitRelList)"
>
移除
{{ $t('map.remove') }}
</el-button>
</template>
</el-table-column>
</el-table>
<el-form-item>
<el-button-group>
<el-button type="primary" size="small" style="margin-top: 10px" @click="lastStep">上一步
<el-button type="primary" size="small" style="margin-top: 10px" @click="lastStep">{{ $t('map.lastStep') }}
</el-button>
</el-button-group>
<el-button-group>
@ -85,7 +85,7 @@
:loading="loading"
style="margin-top: 10px"
@click="save"
>保存</el-button>
>{{ $t('map.save') }}</el-button>
<el-button
v-if="editShow"
type="warning"
@ -93,7 +93,7 @@
:loading="loading"
style="margin-top: 10px"
@click="save"
>更新</el-button>
>{{ $t('map.updata') }}</el-button>
</el-button-group>
</el-form-item>
</div>
@ -153,10 +153,10 @@ export default {
display: 1,
rules: {
startSectionCode: [
{ required: true, message: '请选择开始信号机', trigger: 'change' }
{ required: true, message: this.$t('rules.pleaseSelectStartSignal'), trigger: 'change' }
],
endSectionCode: [
{ required: true, message: '请选择结束信号机', trigger: 'change' }
{ required: true, message: this.$t('rules.pleaseSelectEndSignal'), trigger: 'change' }
]
}
};
@ -266,19 +266,19 @@ export default {
this.loading = true;
if (this.editShow) {
setRouteUnit(this.buildModel()).then(response => {
this.$message.success('更新成功');
this.$message.success(this.$t('tip.updateSuccessfully'));
this.clear();
}).catch(() => {
this.$messageBox('操作异常');
this.$messageBox(this.$t('tip.operationAbnormal'));
this.loading = false;
});
} else {
[
addRouteUnit(this.buildModel()).then(response => {
this.$message.success('创建成功');
this.$message.success(this.$t('tip.createSuccess'));
this.clear();
}).catch(() => {
this.$messageBox('操作异常');
this.$messageBox(this.$t('tip.operationAbnormal'));
this.loading = false;
})
];

View File

@ -1,5 +1,5 @@
<template>
<el-dialog title="进路预览" :visible.sync="show" width="95%" :before-do-close="doClose">
<el-dialog :title="$t('map.routePreview')" :visible.sync="show" width="95%" :before-do-close="doClose">
<div>
<QueryListPage
ref="queryListPage"
@ -51,28 +51,28 @@ export default {
queryObject: {
name: {
type: 'select',
label: '进路名称',
label: this.$t('map.pathName'),
config: {
data: []
}
},
stationCode: {
type: 'select',
label: '所属车站名称',
label: this.$t('map.affiliationStationCode'),
config: {
data: []
}
},
startSignalCode: {
type: 'select',
label: '始端信号机名称',
label: this.$t('map.startingSignalName'),
config: {
data: []
}
},
endSignalCode: {
type: 'select',
label: '终端信号机名称',
label: this.$t('map.endingSignalName'),
config: {
data: []
}
@ -86,83 +86,83 @@ export default {
indexShow: true,
columns: [
{
title: '进路ID',
title: this.$t('map.routeID'),
prop: 'code'
},
{
title: '进路名称',
title: this.$t('map.pathName'),
prop: 'name'
},
{
title: '所属地图名称',
title: this.$t('map.pathUnitMapName'),
prop: 'mapId'
},
{
title: '所属车站名称',
title: this.$t('map.affiliationStationCode'),
prop: 'stationCode'
},
{
title: '进路性质类型',
title: this.$t('map.accessType'),
prop: 'natureType'
},
{
title: '自动进路类型',
title: this.$t('map.automaticAccessType'),
prop: 'autoType'
},
{
title: '始端信号机名称',
title: this.$t('map.startingSignalName'),
prop: 'startSignalCode'
},
{
title: '终端信号机名称',
title: this.$t('map.endingSignalName'),
prop: 'endSignalCode'
},
{
title: '接近区段名称',
title: this.$t('map.nearSectionCode'),
prop: 'nearSectionCode'
},
{
type: 'button',
title: '延续保护道岔数据',
title: this.$t('map.continueProtectSwitchData'),
buttons: [
{
name: '预览',
name: this.$t('map.preview'),
handleClick: this.overlapSwitchDetail
}
]
},
{
type: 'button',
title: '进路侧防道岔数据',
title: this.$t('map.accessSideTurnoutData'),
buttons: [
{
name: '预览',
name: this.$t('map.preview'),
handleClick: this.flankProtectionSwitchDetail
}
]
},
{
title: '折返轨名称',
title: this.$t('map.turnBackRailName'),
prop: 'turnBackSectionCode'
},
{
type: 'button',
title: '进路自动触发区段数据',
title: this.$t('map.routeSegmentData'),
buttons: [
{
name: '预览',
name: this.$t('map.preview'),
handleClick: this.routeTrigger
}
]
},
{
type: 'button',
title: '进路延续保护区段数据',
title: this.$t('map.routeProtectsData'),
buttons: [
{
name: '预览',
name: this.$t('map.preview'),
handleClick: this.routeOverlap
}
]
@ -170,55 +170,55 @@ export default {
{
type: 'button',
title: '进路物理区段数据',
title: this.$t('map.accessPhysical'),
buttons: [
{
name: '预览',
name: this.$t('map.preview'),
handleClick: this.sectionDetail
}
]
},
{
type: 'button',
title: '进路屏蔽门数据',
title: this.$t('map.routeAccessScreenData'),
buttons: [
{
name: '预览',
name: this.$t('map.preview'),
handleClick: this.stationStandDetail
}
]
},
{
type: 'button',
title: '进路道岔数据',
title: this.$t('map.routeAccessTurnoutData'),
buttons: [
{
name: '预览',
name: this.$t('map.preview'),
handleClick: this.accessSwitchDetail
}
]
},
{
type: 'button',
title: '敌对进路数据',
title: this.$t('map.hostileApproachData'),
buttons: [
{
name: '关系',
name: this.$t('map.relation'),
handleClick: this.related
}
]
},
{
type: 'button',
title: '操作',
title: this.$t('map.operation'),
width: '200',
buttons: [
{
name: '编辑',
name: this.$t('map.compile'),
handleClick: this.edit
},
{
name: '删除',
name: this.$t('map.deleteObj'),
handleClick: this.deleteObj,
type: 'danger'
}
@ -332,7 +332,7 @@ export default {
const fieldList = {
id: row.id,
mapId: this.$route.params.mapId,
title: '进路自动触发区段数据',
title: this.$t('map.routeSegmentData'),
name: row.name,
model: {
field: 'routeTriggerSectionList',

View File

@ -47,7 +47,9 @@ export default {
},
selected: {
type: Object,
required: true
default() {
return null;
}
},
cardHeight: {
type: Number || String,

View File

@ -29,7 +29,7 @@
</template>
<script>
// import { queryRouteAccessDetail } from '@/api/jmap/mapdraft';
export default {
name: 'DictionaryDetailEdit',
props: {

View File

@ -8,23 +8,23 @@
append-to-body
>
<el-form ref="form" :model="editModel" label-width="120px" size="mini">
<el-form-item label="进路名称:" prop="name" readonly="true">
<el-form-item :label="$t('map.routeName')" prop="name" readonly="true">
<el-input v-model="editModel.name" :disabled="true" />
</el-form-item>
<el-form-item label="关联进路:">
<el-form-item :label="$t('map.associatedRoute')">
<el-transfer
v-model="routeColloction"
filterable
:filter-method="filterRoute"
filter-placeholder="请输入名称查询"
:filter-placeholder="$t('map.pleaseEnterNameQuery')"
:data="routeData"
:titles="['进路集合', '关联进路ID']"
/>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="doSave"> </el-button>
<el-button @click="show = false"> </el-button>
<el-button type="primary" @click="doSave">{{ $t('map.save') }}</el-button>
<el-button @click="show = false">{{ $t('map.cancel') }}</el-button>
</span>
</el-dialog>
</template>
@ -42,7 +42,7 @@ export default {
data() {
return {
show: false,
title: '关联敌对记录',
title: this.$t('map.associatedHostileRecord'),
routes: [],
routeColloction: [],
routeData: [],
@ -84,7 +84,7 @@ export default {
}
this.show = true;
}).catch(() => {
this.$messageBox('操作异常');
this.$messageBox(this.$t('tip.operationAbnormal'));
});
},
doClose(done) {
@ -98,9 +98,9 @@ export default {
accessAgainstList: this.routeColloction.map(elem => { return { againstRouteCode: elem }; })
};
updateAgainstAccess(model).then(response => {
this.$message.success('保存成功');
this.$message.success(this.$t('tip.saveSuccessfully'));
}).catch(() => {
this.$messageBox('操作异常');
this.$messageBox(this.$t('tip.operationAbnormal'));
});
}
}

View File

@ -2,32 +2,32 @@
<div :style="{ height: cardHeight +'px' }">
<el-scrollbar wrap-class="scrollbar-wrapper">
<el-form ref="form" :model="addModel" :rules="rules" label-width="190px" size="mini">
<el-form-item label="进路名称" prop="name">
<el-form-item :label="$t('map.routeName')" prop="name">
<el-input v-model="addModel.name" />
</el-form-item>
<el-form-item label="所属设备集中站:" prop="stationCode">
<el-form-item :label="$t('map.equipmentStation')" prop="stationCode">
<el-select v-model="addModel.stationCode" filterable @change="deviceChange">
<el-option v-for="item in stationList" :key="item.code" :label="item.name" :value="item.code" />
</el-select>
</el-form-item>
<el-form-item label="是否自动追踪/联锁自动触发" prop="arc">
<el-form-item :label="$t('map.routeArc')" prop="arc">
<el-radio-group v-model="addModel.arc">
<el-radio :label="true"></el-radio>
<el-radio :label="false"></el-radio>
<el-radio :label="true">{{ $t('map.are') }}</el-radio>
<el-radio :label="false">{{ $t('map.deny') }}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="是否车队/联锁自动进路" prop="flt">
<el-form-item :label="$t('map.routeFlt')" prop="flt">
<el-radio-group v-model="addModel.flt">
<el-radio :label="true"></el-radio>
<el-radio :label="false"></el-radio>
<el-radio :label="true">{{ $t('map.are') }}</el-radio>
<el-radio :label="false">{{ $t('map.deny') }}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="延时解锁时间" prop="delayReleaseTime">
<el-form-item :label="$t('map.delayUnlockingTime')" prop="delayReleaseTime">
<el-input-number v-model="addModel.delayReleaseTime" :min="0" />
<span>s</span>
</el-form-item>
<el-form-item label="进路性质类型:" prop="natureType">
<el-form-item :label="$t('map.accessTypeColon')" prop="natureType">
<el-select v-model="addModel.natureType" :filterable="true">
<el-option
v-for="item in RouteNatureTypeList"
@ -37,7 +37,7 @@
/>
</el-select>
</el-form-item>
<el-form-item label="自动进路类型:" prop="autoType">
<el-form-item :label="$t('map.automaticAccessTypeColon')" prop="autoType">
<el-select v-model="addModel.autoType" :filterable="true">
<el-option
v-for="item in RouteAutoTypeList"
@ -47,7 +47,7 @@
/>
</el-select>
</el-form-item>
<el-form-item label="始端信号机ID:" prop="startSignalCode">
<el-form-item :label="$t('map.startSignalId')" prop="startSignalCode">
<el-select v-model="addModel.startSignalCode" clearable :filterable="true">
<el-option
v-for="item in signalList"
@ -59,9 +59,9 @@
<el-button
:type=" field === 'startSignalCode' ? 'danger' : 'primary'"
@click="hover('startSignalCode')"
>激活</el-button>
>{{ $t('map.activate') }}</el-button>
</el-form-item>
<el-form-item label="终端信号机ID:" prop="endSignalCode">
<el-form-item :label="$t('map.endSignalId')" prop="endSignalCode">
<el-select v-model="addModel.endSignalCode" clearable :filterable="true">
<el-option
v-for="item in signalList"
@ -73,9 +73,9 @@
<el-button
:type=" field === 'endSignalCode' ? 'danger' : 'primary'"
@click="hover('endSignalCode')"
>激活</el-button>
>{{ $t('map.activate') }}</el-button>
</el-form-item>
<el-form-item label="接近区段ID:" prop="nearSectionCode">
<el-form-item :label="$t('map.nearSectionCodeColon')" prop="nearSectionCode">
<el-select v-model="addModel.nearSectionCode" clearable :filterable="true">
<el-option
v-for="item in sectionList"
@ -87,16 +87,16 @@
<el-button
:type=" field === 'nearSectionCode' ? 'danger' : 'primary'"
@click="hover('nearSectionCode')"
>激活</el-button>
>{{ $t('map.activate') }}</el-button>
</el-form-item>
<!-- <el-form-item label="自动触发区段ID:" prop="autoTriggerSectionCode">
<el-select v-model="addModel.autoTriggerSectionCode" clearable :filterable="true">
<el-option v-for="item in sectionList" :key="item.code" :label="item.name + ' (' + item.code+ ')'"
:value="item.code"></el-option>
</el-select>
<el-button @click="hover('autoTriggerSectionCode')" :type=" field === 'autoTriggerSectionCode' ? 'danger' : 'primary'">激活</el-button>
<el-button @click="hover('autoTriggerSectionCode')" :type=" field === 'autoTriggerSectionCode' ? 'danger' : 'primary'">{{ $t('map.activate') }}</el-button>
</el-form-item> -->
<el-form-item label="进路自动触发区段数据:" prop="routeTriggerSectionList">
<el-form-item :label="$t('map.routeTriggerSectionList')" prop="routeTriggerSectionList">
<el-select v-model="addModel.routeTriggerSectionList" multiple clearable :filterable="true">
<el-option
v-for="item in sectionList"
@ -108,9 +108,9 @@
<el-button
:type=" field === 'routeTriggerSectionList' ? 'danger' : 'primary'"
@click="hover('routeTriggerSectionList')"
>激活</el-button>
>{{ $t('map.activate') }}</el-button>
</el-form-item>
<el-form-item label="进路延续保护区段数据:" prop="routeOverlapSectionList">
<el-form-item :label="$t('map.routeOverlapSectionList')" prop="routeOverlapSectionList">
<el-select v-model="addModel.routeOverlapSectionList" multiple clearable :filterable="true">
<el-option
v-for="item in sectionList"
@ -122,7 +122,7 @@
<el-button
:type=" field === 'routeOverlapSectionList' ? 'danger' : 'primary'"
@click="hover('routeOverlapSectionList')"
>激活</el-button>
>{{ $t('map.activate') }}</el-button>
</el-form-item>
<!-- <el-form-item label="延续保护道岔ID:" prop="routeOverlapSwitchList">
@ -130,7 +130,7 @@
<el-option v-for="item in switchList" :key="item.code" :label="item.name + ' (' + item.code+ ')'"
:value="item.code"></el-option>
</el-select>
<el-button @click="hover('routeOverlapSwitchList')" :type=" field === 'routeOverlapSwitchList' ? 'danger' : 'primary'">激活</el-button>
<el-button @click="hover('routeOverlapSwitchList')" :type=" field === 'routeOverlapSwitchList' ? 'danger' : 'primary'">{{ $t('map.activate') }}</el-button>
</el-form-item>
<el-form-item label="延续保护道岔位置类型:" prop="overlapSwitchLocateType">
<el-select v-model="addModel.overlapSwitchLocateType" :filterable="true">
@ -138,8 +138,8 @@
</el-select>
</el-form-item> -->
<el-form-item label="延续保护道岔数据:" prop="routeOverlapSwitchList">
<el-select v-model="overlapCode" clearable :filterable="true" placeholder="请选择道岔数据">
<el-form-item :label="$t('map.routeOverlapSwitchList')" prop="routeOverlapSwitchList">
<el-select v-model="overlapCode" clearable :filterable="true" :placeholder="$t('map.pleaseSelect')">
<el-option
v-for="item in switchList"
:key="item.code"
@ -150,13 +150,13 @@
<el-button
:type=" field === 'routeOverlapSwitchList' ? 'danger' : 'primary'"
@click="hover('routeOverlapSwitchList')"
>激活</el-button>
>{{ $t('map.activate') }}</el-button>
<el-button
type="primary"
@click="pushSwitch(addModel.routeOverlapSwitchList, {switchCode:overlapCode, switchLocateType:overlapType})"
>添加
>{{ $t('map.add') }}
</el-button>
<el-select v-model="overlapType" :filterable="true" placeholder="请选择道岔类型">
<el-select v-model="overlapType" :filterable="true" :placeholder="$t('map.pleaseSelect')">
<el-option
v-for="item in SwitchLocateTypeList"
:key="item.code"
@ -165,28 +165,28 @@
/>
</el-select>
<el-table :data="addModel.routeOverlapSwitchList" border style="width: 97%">
<el-table-column prop="switchCode" label="道岔ID">
<el-table-column prop="switchCode" :label="$t('map.switchId')">
<template slot-scope="scope">
<span>{{ swictchName(scope.row.switchCode) }}</span>
</template>
</el-table-column>
<el-table-column prop="switchLocateType" label="道岔类型" />
<el-table-column fixed="right" label="操作" width="50">
<el-table-column prop="switchLocateType" :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(addModel.routeOverlapSwitchList, scope.$index)"
>
移除
{{ $t('map.remove') }}
</el-button>
</template>
</el-table-column>
</el-table>
</el-form-item>
<el-form-item label="侧防道岔数据:" prop="routeFlankProtectionList">
<el-select v-model="flankCode" clearable :filterable="true" placeholder="请选择道岔数据">
<el-form-item :label="$t('map.routeFlankProtectionList')" prop="routeFlankProtectionList">
<el-select v-model="flankCode" clearable :filterable="true" :placeholder="$t('map.pleaseSelect')">
<el-option
v-for="item in switchList"
:key="item.code"
@ -197,13 +197,13 @@
<el-button
:type=" field === 'routeFlankProtectionList' ? 'danger' : 'primary'"
@click="hover('routeFlankProtectionList')"
>激活</el-button>
>{{ $t('map.activate') }}</el-button>
<el-button
type="primary"
@click="pushSwitch(addModel.routeFlankProtectionList, {switchCode:flankCode, switchLocateType:flankType})"
>添加
>{{ $t('map.add') }}
</el-button>
<el-select v-model="flankType" :filterable="true" placeholder="请选择道岔类型">
<el-select v-model="flankType" :filterable="true" :placeholder="$t('map.pleaseSelect')">
<el-option
v-for="item in SwitchLocateTypeList"
:key="item.code"
@ -212,12 +212,12 @@
/>
</el-select>
<el-table :data="addModel.routeFlankProtectionList" border style="width: 97%">
<el-table-column prop="switchCode" label="道岔ID">
<el-table-column prop="switchCode" :label="$t('map.switchId')">
<template slot-scope="scope">
<span>{{ swictchName(scope.row.switchCode) }}</span>
</template>
</el-table-column>
<el-table-column prop="switchLocateType" label="道岔类型" />
<el-table-column prop="switchLocateType" :label="$t('map.switchType')" />
<el-table-column fixed="right" label="操作" width="50">
<template slot-scope="scope">
<el-button
@ -225,14 +225,14 @@
size="small"
@click.native.prevent="deleteSwitch(addModel.routeFlankProtectionList, scope.$index)"
>
移除
{{ $t('map.remove') }}
</el-button>
</template>
</el-table-column>
</el-table>
</el-form-item>
<el-form-item label="折返轨ID:" prop="turnBackSectionCode">
<el-form-item :label="$t('map.turnBackSectionCode')" prop="turnBackSectionCode">
<el-select v-model="addModel.turnBackSectionCode" clearable :filterable="true">
<el-option
v-for="item in sectionList"
@ -244,10 +244,10 @@
<el-button
:type=" field === 'turnBackSectionCode' ? 'danger' : 'primary'"
@click="hover('turnBackSectionCode')"
>激活</el-button>
>{{ $t('map.activate') }}</el-button>
</el-form-item>
<el-form-item label="进路物理区段数据:" prop="accessSectionList">
<el-select v-model="addModel.accessSectionList" multiple :filterable="true" placeholder="请选择">
<el-form-item :label="$t('map.accessSectionList')" prop="accessSectionList">
<el-select v-model="addModel.accessSectionList" multiple :filterable="true" :placeholder="$t('map.pleaseSelect')">
<el-option
v-for="item in sectionList"
:key="item.code"
@ -258,10 +258,10 @@
<el-button
:type=" field === 'accessSectionList' ? 'danger' : 'primary'"
@click="hover('accessSectionList')"
>激活</el-button>
>{{ $t('map.activate') }}</el-button>
</el-form-item>
<el-form-item label="进路屏蔽门数据:" prop="accessStandList">
<el-select v-model="addModel.accessStandList" multiple :filterable="true" placeholder="请选择">
<el-form-item :label="$t('map.accessStandList')" prop="accessStandList">
<el-select v-model="addModel.accessStandList" multiple :filterable="true" :placeholder="$t('map.pleaseSelect')">
<el-option
v-for="item in stationStandList"
:key="item.code"
@ -272,10 +272,10 @@
<el-button
:type=" field === 'accessStandList' ? 'danger' : 'primary'"
@click="hover('accessStandList')"
>激活</el-button>
>{{ $t('map.activate') }}</el-button>
</el-form-item>
<el-form-item label="进路道岔数据:" prop="accessSwitchList">
<el-select v-model="accessCode" clearable :filterable="true" placeholder="请选择道岔数据">
<el-form-item :label="$t('map.accessSwitchList')" prop="accessSwitchList">
<el-select v-model="accessCode" clearable :filterable="true" :placeholder="$t('map.pleaseSelect')">
<el-option
v-for="item in switchList"
:key="item.code"
@ -286,12 +286,12 @@
<el-button
:type=" field === 'accessSwitchList' ? 'danger' : 'primary'"
@click="hover('accessSwitchList')"
>激活</el-button>
>{{ $t('map.activate') }}</el-button>
<el-button
type="primary"
@click="pushSwitch(addModel.accessSwitchList, { switchCode: accessCode, switchLocateType: accessType } )"
>添加</el-button>
<el-select v-model="accessType" :filterable="true" placeholder="请选择道岔类型">
>{{ $t('map.add') }}</el-button>
<el-select v-model="accessType" :filterable="true" :placeholder="$t('map.pleaseSelect')">
<el-option
v-for="item in SwitchLocateTypeList"
:key="item.code"
@ -300,20 +300,20 @@
/>
</el-select>
<el-table :data="addModel.accessSwitchList" border style="width: 97%">
<el-table-column prop="switchCode" label="道岔ID">
<el-table-column prop="switchCode" :label="$t('map.switchId')">
<template slot-scope="scope">
<span>{{ swictchName(scope.row.switchCode) }}</span>
</template>
</el-table-column>
<el-table-column prop="switchLocateType" label="道岔类型" />
<el-table-column fixed="right" label="操作" width="50">
<el-table-column prop="switchLocateType" :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(addModel.accessSwitchList, scope.$index)"
>
移除
{{ $t('map.remove') }}
</el-button>
</template>
</el-table-column>
@ -321,9 +321,9 @@
</el-form-item>
<el-form-item>
<el-button-group>
<el-button v-if="isSave" type="primary" size="small" :loading="loading" @click="save">保存
<el-button v-if="isSave" type="primary" size="small" :loading="loading" @click="save">{{ $t('map.save') }}
</el-button>
<el-button v-else type="warning" size="small" :loading="loading" @click="update">更新</el-button>
<el-button v-else type="warning" size="small" :loading="loading" @click="update">{{ $t('map.updata') }}</el-button>
</el-button-group>
</el-form-item>
</el-form>
@ -341,7 +341,9 @@ export default {
props: {
selected: {
type: Object,
required: true
default() {
return null;
}
},
mapInfo: {
type: Object,
@ -349,7 +351,9 @@ export default {
},
routeData: {
type: Object,
required: true
default() {
return null;
}
},
cardHeight: {
type: Number || String,
@ -369,20 +373,20 @@ export default {
loading: false,
RouteNatureTypeList: [],
/*
{ code: '01', name: '列车进路' },
{ code: '02', name: '调车进路' },
{ code: '03', name: '折返进路' }
*/
{ code: '01', name: '列车进路' },
{ code: '02', name: '调车进路' },
{ code: '03', name: '折返进路' }
*/
RouteAutoTypeList: [],
/*
{ code: '01', name: '自动进路' },
{ code: '02', name: '非自动进路' }
*/
{ code: '01', name: '自动进路' },
{ code: '02', name: '非自动进路' }
*/
SwitchLocateTypeList: [],
/*
{ code: '01', name: '定位' },
{ code: '02', name: '反位' }
*/
{ code: '01', name: '定位' },
{ code: '02', name: '反位' }
*/
addModel: {
mapId: '',
code: '',
@ -416,45 +420,44 @@ export default {
'stationList',
'stationStandList'
]),
routeName: {
// get() {
// if (this.isSave) {
// let beg = ''; let end = '';
// if (this.signalList) {
// this.signalList.forEach(elem => {
// if (elem.code === this.addModel.startSignalCode) beg = elem.name;
// if (elem.code === this.addModel.endSignalCode) end = elem.name;
// });
// }
// return this.addModel.name = beg + '-' + end;
// }
// }
routeName() {
if (this.isSave) {
let beg = ''; let end = '';
if (this.signalList) {
this.signalList.forEach(elem => {
if (elem.code === this.addModel.startSignalCode) beg = elem.name;
if (elem.code === this.addModel.endSignalCode) end = elem.name;
});
}
return beg + '-' + end;
}
return '';
},
rules() {
const baseRules = {
name: [
{ required: true, message: '请输入进路名称', trigger: 'change' }
{ required: true, message: this.$t('rules.pleaseEnterPathName'), trigger: 'change' }
],
stationCode: [
{ required: true, message: '请选择关联车站', trigger: 'change' }
{ required: true, message: this.$t('rules.stationCode'), trigger: 'change' }
],
startSignalCode: [
{ required: true, message: '请选择开始信号机', trigger: 'change' }
{ required: true, message: this.$t('rules.pleaseSelectStartSignal'), trigger: 'change' }
],
endSignalCode: [
{ required: true, message: '请选择结束信号机', trigger: 'change' }
{ required: true, message: this.$t('rules.pleaseSelectEndSignal'), trigger: 'change' }
],
nearSectionCode: [
{ required: true, message: '请选择接近区段', trigger: 'change' }
{ required: true, message: this.$t('rules.proximitySection'), trigger: 'change' }
],
natureType: [
{ required: true, message: '请选择进路性质类型', trigger: 'change' }
{ required: true, message: this.$t('rules.accessPropertyType'), trigger: 'change' }
],
autoType: [
{ required: true, message: '请选择自动进路类型', trigger: 'change' }
{ required: true, message: this.$t('rules.autoAccessType'), trigger: 'change' }
],
accessSectionList: [
{ required: true, message: '请选择进路物理区段数据', trigger: 'change' }
{ required: true, message: this.$t('rules.physicalSegmentData'), trigger: 'change' }
]
};
return baseRules;
@ -517,7 +520,7 @@ export default {
if (index < 0) {
list.push(data);
} else {
this.$messageBox('相同ID的数据已存在');
this.$messageBox(this.$t('tip.routeSameID'));
}
},
deleteSwitch(list, index) {
@ -539,11 +542,11 @@ export default {
if (valid) {
this.loading = true;
createRouteAccess(this.buildModel(getUID('Route'))).then(response => {
this.$message.success('创建成功');
this.$message.success(this.$t('tip.createSuccess'));
this.loading = false;
this.clear();
}).catch(() => {
this.$messageBox('操作异常');
this.$messageBox(this.$t('tip.operationAbnormal'));
this.loading = false;
});
}
@ -554,11 +557,11 @@ export default {
if (valid) {
this.loading = true;
updateRouteAccess(this.buildModel()).then(response => {
this.$message.success('更新成功');
this.$message.success(this.$t('tip.updateSuccessfully'));
this.loading = false;
this.clear();
}).catch(() => {
this.$messageBox('操作异常');
this.$messageBox(this.$t('tip.operationAbnormal'));
this.loading = false;
});
}

View File

@ -1,5 +1,5 @@
<template>
<el-dialog title="交路列表" :visible.sync="show" width="85%" :before-do-close="doClose">
<el-dialog :title="$t('map.thenList')" :visible.sync="show" width="85%" :before-do-close="doClose">
<div>
<QueryListPage
ref="queryListPage"
@ -42,14 +42,14 @@ export default {
queryObject: {
startStationCode: {
type: 'select',
label: '起始站',
label: this.$t('map.startStation'),
config: {
data: []
}
},
endStationCode: {
type: 'select',
label: '终到站',
label: this.$t('map.endStation'),
config: {
data: []
}