This commit is contained in:
joylink_cuiweidong 2019-09-19 17:11:11 +08:00
commit 98054a93ff
13 changed files with 208 additions and 107 deletions

View File

@ -191,5 +191,40 @@ export default {
serviceNumber2: 'Service number', serviceNumber2: 'Service number',
addPlanTrain: 'Add plan train', addPlanTrain: 'Add plan train',
trainRunningTimeInterval: 'Train running time interval', trainRunningTimeInterval: 'Train running time interval',
sizeOfTheLoopTrainProportion: 'The size of the loop car proportion' sizeOfTheLoopTrainProportion: 'The size of the loop car proportion',
applicationRouteSelection: 'Application route selection',
bothway: 'bothway',
up: 'up',
down: 'down',
runningInterval: 'Running interval',
addASmoothRunningTime: 'Add a smooth running time',
addToTheFront: 'Add to the front',
addToTheEnd: 'Add to the end',
crossRailway: 'Cross railway',
startingSection: 'Starting section',
description: 'Description',
section: 'Section',
departureTime: 'departureTime',
showDefaultStopTimeAndRunLevel: 'Show default stop time and run level',
automatic: 'Automatic',
default: 'Default',
addTaskHint1: 'Please set the section running time of the start section ',
addTaskHint2: 'to the section',
addTaskHint3: '',
normalNew: 'Normal new',
createFromTheReleaseRunGraph: 'Create from the release run graph',
releaseRunGraph: 'Release run graph',
newRunGraph: 'New run graph',
deleteAllPreviousTasks: 'Delete all previous tasks (including this task)',
deleteAllSubsequentTasks: 'Delete all subsequent tasks (including this task)',
forward: 'Forward',
backward: 'Backward',
frequency: 'Frequency:',
intervals: 'Intervals:',
duplicateTrain: 'Duplicate train',
commissioningTrain: 'Commissioning train',
task: 'Task',
startTime: 'Start time',
endTime: 'End time',
editPlanningTrain: 'Edit planning train'
}; };

View File

@ -275,5 +275,7 @@ export default {
inputMaxDuration: 'Please input max duration', inputMaxDuration: 'Please input max duration',
accessNumber: 'Please input the number of permissions', accessNumber: 'Please input the number of permissions',
courseNameEmpty: 'Course name cannot be empty', courseNameEmpty: 'Course name cannot be empty',
purchaseMonth: 'Please input the number of months to buy' purchaseMonth: 'Please input the number of months to buy',
enterTheNameOfTheRunGraph: 'Please enter the name of the run graph',
chooseToPublishTheRunGraph: 'Please choose to publish the run chart'
}; };

View File

@ -183,5 +183,17 @@ export default {
requestingStationDataFailed: 'Requesting station data failed', requestingStationDataFailed: 'Requesting station data failed',
serviceNumberExistHint: 'This table number already exists. Is it mandatory to set it? (The forced setup program may be abnormal)', serviceNumberExistHint: 'This table number already exists. Is it mandatory to set it? (The forced setup program may be abnormal)',
serviceNumberLengthHint: 'Length should be two digits', serviceNumberLengthHint: 'Length should be two digits',
chooseToOpenTheRunGraph: 'Please choose to open the running chart' chooseToOpenTheRunGraph: 'Please choose to open the running chart',
addTaskSuccessfully: 'Add task successfully!',
addTaskFailed: 'Add task failed!',
createAnEmptyRunGraphSuccessfully: 'Create an empty run graph successfully!',
createARunGraphSuccessfully: 'Create a running diagram successfully!',
deleteTaskSuccessfully: 'Delete task successfully!',
deleteTaskFailed: 'Delete task failed!',
duplicatePlanSuccessful: 'Duplicate plan successful!',
duplicatePlanFailed: 'Duplicate plan failed!',
runGraphNameModifiedSuccessfully: 'Run graph name modified successfully!',
modifyRunGraphNameFailed: 'Modify run graph name failed!',
planCreationSuccessful: 'Plan creation successful!',
createPlanFailed: 'Failed to create plan!'
}; };

View File

@ -143,7 +143,7 @@ export default {
afterTheTrainHasBackInterval: '有车回段后间隔', afterTheTrainHasBackInterval: '有车回段后间隔',
secondsCanBeRunnedByTrain: '秒才能用列车出段', secondsCanBeRunnedByTrain: '秒才能用列车出段',
defaultStopTime: '省缺停站时间:', defaultStopTime: '省缺停站时间:',
defaultRunLevel: '省缺运行等级:', defaultRunLevel: '省缺运行等级:',
stopTime: '停站时间', stopTime: '停站时间',
runLevel: '运行等级', runLevel: '运行等级',
platform: '站台', platform: '站台',
@ -192,5 +192,43 @@ export default {
serviceNumber2: '服务号', serviceNumber2: '服务号',
addPlanTrain: '添加计划车', addPlanTrain: '添加计划车',
trainRunningTimeInterval: '列车运行时间间隔', trainRunningTimeInterval: '列车运行时间间隔',
sizeOfTheLoopTrainProportion: '大小环路分车比例' sizeOfTheLoopTrainProportion: '大小环路分车比例',
applicationRouteSelection: '应用路线选择',
bothway: '双向',
up: '上行',
down: '下行',
runningInterval: '运行间隔',
distributionRatio: '分车比例',
addASmoothRunningTime: '添加平稳运行时段',
addToTheFront: '加在最前',
addToTheEnd: '加在最后',
crossRailway: '交路',
startingSection: '起始区段',
endingSection: '终到区段',
description: '描述',
section: '区段',
departureTime: '发点',
showDefaultStopTimeAndRunLevel: '显示默认停站时间和运行等级',
automatic: '自动',
default: '默认',
addTaskHint1: '请先设置开始区段',
addTaskHint2: '终到区段',
addTaskHint3: '的站间运行时间',
normalNew: '正常新建',
runGraphName: '运行图名称',
createFromTheReleaseRunGraph: '从发布运行图创建',
releaseRunGraph: '发布运行图',
newRunGraph: '新建运行图',
deleteAllPreviousTasks: '删除以前所有任务(包含本任务)',
deleteAllSubsequentTasks: '删除以后所有任务(包含本任务)',
forward: '向前',
backward: '向后',
frequency: '次数:',
intervals: '间隔时间:',
duplicateTrain: '复制列车',
commissioningTrain: '调试车',
task: '任务',
startTime: '起始时间',
endTime: '终到时间',
editPlanningTrain: '编辑计划车'
}; };

View File

@ -277,5 +277,7 @@ export default {
enterTheServiceNumber: '请输入表号', enterTheServiceNumber: '请输入表号',
enterTheTripNumber: '请输入车次号', enterTheTripNumber: '请输入车次号',
enterTheTargetCode: '请输入目的地号', enterTheTargetCode: '请输入目的地号',
selectStation: '请选择车站' selectStation: '请选择车站',
enterTheNameOfTheRunGraph: '请输入运行图名称',
chooseToPublishTheRunGraph: '请选择发布运行图'
}; };

View File

@ -183,5 +183,17 @@ export default {
requestingStationDataFailed: '请求车站数据失败', requestingStationDataFailed: '请求车站数据失败',
serviceNumberExistHint: '本表号已存在,是否强制设置?(强制设置程序可能会出现异常)', serviceNumberExistHint: '本表号已存在,是否强制设置?(强制设置程序可能会出现异常)',
serviceNumberLengthHint: '长度应为两位数', serviceNumberLengthHint: '长度应为两位数',
chooseToOpenTheRunGraph: '请选打开运行图' chooseToOpenTheRunGraph: '请选打开运行图',
addTaskSuccessfully: '添加任务成功!',
addTaskFailed: '添加任务失败!',
createAnEmptyRunGraphSuccessfully: '创建空运行图成功!',
createARunGraphSuccessfully: '创建运行图成功!',
deleteTaskSuccessfully: '删除任务成功!',
deleteTaskFailed: '删除任务失败!',
duplicatePlanSuccessful: '复制计划成功!',
duplicatePlanFailed: '复制计划失败!',
runGraphNameModifiedSuccessfully: '修改运行图名称成功!',
modifyRunGraphNameFailed: '修改运行图名称失败!',
planCreationSuccessful: '创建计划成功!',
createPlanFailed: '创建计划失败!'
}; };

View File

@ -38,38 +38,38 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="9" :offset="1"> <el-col :span="9" :offset="1">
<span>大小环路分车比例</span> <span>{{$t('planMonitor.sizeOfTheLoopTrainProportion')+$t('global.colon')}}</span>
</el-col> </el-col>
<el-col :span="14"> <el-col :span="14">
<el-select v-model="model.scale" placeholder="请选择"> <el-select v-model="model.scale" :placeholder="this.$t('global.choose')">
<el-option v-for="item in scaleList" :key="item.value" :label="item.label" :value="item.value" /> <el-option v-for="item in scaleList" :key="item.value" :label="item.label" :value="item.value" />
</el-select> </el-select>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="9" :offset="1"> <el-col :span="9" :offset="1">
<span>应用进路方向选择</span> <span>{{$t('planMonitor.applicationRouteSelection')+$t('global.colon')}}</span>
</el-col> </el-col>
<el-col :span="14"> <el-col :span="14">
<el-radio-group v-model="model.direction"> <el-radio-group v-model="model.direction">
<el-radio :label="0">双向</el-radio> <el-radio :label="0">{{$t('planMonitor.bothway')}}</el-radio>
<el-radio :label="1">上行</el-radio> <el-radio :label="1">{{$t('planMonitor.up')}}</el-radio>
<el-radio :label="2">下行</el-radio> <el-radio :label="2">{{$t('planMonitor.down')}}</el-radio>
</el-radio-group> </el-radio-group>
</el-col> </el-col>
</el-row> </el-row>
<el-row style="margin-top: 20px"> <el-row style="margin-top: 20px">
<el-table :data="model.smoothList" border :height="240"> <el-table :data="model.smoothList" border :height="240">
<el-table-column prop="startTime" label="开始时间" /> <el-table-column prop="startTime" :label="this.$t('global.startTime')" />
<el-table-column prop="stopTime" label="结束时间" /> <el-table-column prop="stopTime" :label="this.$t('global.endTime')"/>
<el-table-column prop="runInterval" label="运行间隔" /> <el-table-column prop="runInterval" :label="this.$t('planMonitor.runningInterval')" />
<el-table-column prop="scale" label="分车比例" /> <el-table-column prop="scale" :label="this.$t('planMonitor.distributionRatio')" />
</el-table> </el-table>
</el-row> </el-row>
</div> </div>
<el-row type="flex" justify="center" class="button-group"> <el-row type="flex" justify="center" class="button-group">
<el-button @click="handleCommit"> </el-button> <el-button @click="handleCommit">{{$t('global.confirm')}}</el-button>
<el-button @click="doClose"> </el-button> <el-button @click="doClose">{{$t('global.cancel')}}</el-button>
</el-row> </el-row>
</el-dialog> </el-dialog>
</template> </template>
@ -93,7 +93,7 @@ export default {
}, },
computed: { computed: {
title() { title() {
return '添加平稳运行时段'; return this.$t('planMonitor.addASmoothRunningTime');
} }
}, },
mounted() { mounted() {

View File

@ -12,13 +12,13 @@
> >
<el-row> <el-row>
<el-col :span="3" style="height: 28px;line-height: 28px;"> <el-col :span="3" style="height: 28px;line-height: 28px;">
<el-radio v-model="addModel.addToFront" :label="true">加在最前</el-radio> <el-radio v-model="addModel.addToFront" :label="true">{{$t('planMonitor.addToTheFront')}}</el-radio>
</el-col> </el-col>
<el-col :span="4" style="margin-left: 10px;height: 28px;line-height: 28px;"> <el-col :span="4" style="margin-left: 10px;height: 28px;line-height: 28px;">
<span>车次号</span> <span>{{$t('planMonitor.tripNumber')+$t('global.colon')}}</span>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-select v-model="addModel.tripNumber" size="mini" placeholder="请选择"> <el-select v-model="addModel.tripNumber" size="mini" :placeholder="this.$t('global.choose')">
<el-option <el-option
v-for="item in tripNumberList" v-for="item in tripNumberList"
:key="item.value" :key="item.value"
@ -28,7 +28,7 @@
</el-select> </el-select>
</el-col> </el-col>
<el-col :span="4" style="margin-left: 20px;height: 28px;line-height: 28px;"> <el-col :span="4" style="margin-left: 20px;height: 28px;line-height: 28px;">
<span>开始时间</span> <span>{{$t('global.startTime')+$t('global.colon')}}</span>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-time-picker v-model="addModel.startTime" size="mini" value-format="HH:mm:ss" :clearable="false" /> <el-time-picker v-model="addModel.startTime" size="mini" value-format="HH:mm:ss" :clearable="false" />
@ -36,13 +36,13 @@
</el-row> </el-row>
<el-row style="margin-top: 5px;height: 28px;line-height: 28px;"> <el-row style="margin-top: 5px;height: 28px;line-height: 28px;">
<el-col :span="3"> <el-col :span="3">
<el-radio v-model="addModel.addToFront" :label="false">加在最后</el-radio> <el-radio v-model="addModel.addToFront" :label="false">{{$t('planMonitor.addToTheEnd')}}</el-radio>
</el-col> </el-col>
<el-col :span="4" style="margin-left: 10px;height: 28px;line-height: 28px;"> <el-col :span="4" style="margin-left: 10px;height: 28px;line-height: 28px;">
<span>缺省停站时间</span> <span>{{$t('planMonitor.defaultStopTime')+$t('global.colon')}}</span>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-select v-model="addModel.defaultStopTime" size="mini" placeholder="请选择"> <el-select v-model="addModel.defaultStopTime" size="mini" :placeholder="this.$t('global.choose')">
<el-option <el-option
v-for="item in defaultStopTimeList" v-for="item in defaultStopTimeList"
:key="item.value" :key="item.value"
@ -52,10 +52,10 @@
</el-select> </el-select>
</el-col> </el-col>
<el-col :span="4" style="margin-left: 20px;height: 28px;line-height: 28px;"> <el-col :span="4" style="margin-left: 20px;height: 28px;line-height: 28px;">
<span>缺省运行等级</span> <span>{{$t('planMonitor.defaultRunLevel')+$t('global.colon')}}</span>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-select v-model="addModel.defaultSpeedLevel" size="mini" placeholder="请选择"> <el-select v-model="addModel.defaultSpeedLevel" size="mini" :placeholder="this.$t('global.choose')">
<el-option <el-option
v-for="item in defaultSpeedLevelList" v-for="item in defaultSpeedLevelList"
:key="item.value" :key="item.value"
@ -67,7 +67,7 @@
</el-row> </el-row>
<el-row style="margin-bottom: 5px;"> <el-row style="margin-bottom: 5px;">
交路 {{$t('planMonitor.crossRailway')+$t('global.colon')}}
</el-row> </el-row>
<el-row> <el-row>
<el-table <el-table
@ -77,58 +77,58 @@
:height="180" :height="180"
@row-click="handleClick" @row-click="handleClick"
> >
<el-table-column prop="startStationCode" label="起始站"> <el-table-column prop="startStationCode" :label="this.$t('planMonitor.startingStation')">
<template slot-scope="scope"> <template slot-scope="scope">
{{ formatName(scope.row.startStationCode) }} {{ formatName(scope.row.startStationCode) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="startSectionCode" label="起始区段"> <el-table-column prop="startSectionCode" :label="this.$t('planMonitor.startingSection')">
<template slot-scope="scope"> <template slot-scope="scope">
{{ formatName(scope.row.startSectionCode) }} {{ formatName(scope.row.startSectionCode) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="endStationCode" label="终到站"> <el-table-column prop="endStationCode" :label="this.$t('planMonitor.terminal')">
<template slot-scope="scope"> <template slot-scope="scope">
{{ formatName(scope.row.endStationCode) }} {{ formatName(scope.row.endStationCode) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="endSectionCode" label="终到区段"> <el-table-column prop="endSectionCode" :label="this.$t('planMonitor.endingSection')">
<template slot-scope="scope"> <template slot-scope="scope">
{{ formatName(scope.row.endSectionCode) }} {{ formatName(scope.row.endSectionCode) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="remarks" label="描述" /> <el-table-column prop="remarks" :label="this.$t('planMonitor.description')" />
</el-table> </el-table>
</el-row> </el-row>
<el-row style=" margin-bottom: 5px;margin-top: 10px;"> <el-row style=" margin-bottom: 5px;margin-top: 10px;">
详情 {{$t('global.details')+$t('global.colon')}}
</el-row> </el-row>
<el-row> <el-row>
<el-table :data="addModel.arriveConfigList" border :height="180"> <el-table :data="addModel.arriveConfigList" border :height="180">
<el-table-column prop="stationCode" label="车站"> <el-table-column prop="stationCode" :label="this.$t('planMonitor.station')">
<template slot-scope="scope"> <template slot-scope="scope">
{{ formatName(scope.row.stationCode) }} {{ formatName(scope.row.stationCode) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="sectionCode" label="区段"> <el-table-column prop="sectionCode" :label="this.$t('planMonitor.section')">
<template slot-scope="scope"> <template slot-scope="scope">
{{ formatName(scope.row.sectionCode) }} {{ formatName(scope.row.sectionCode) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="arriveTime" label="到点" /> <el-table-column prop="arriveTime" :label="this.$t('planMonitor.arriveTime')" />
<el-table-column prop="stopTime" label="停站时间" /> <el-table-column prop="stopTime" :label="this.$t('planMonitor.stopTime')" />
<el-table-column prop="departureTime" label="发点" /> <el-table-column prop="departureTime" :label="this.$t('planMonitor.departureTime')" />
<el-table-column prop="speedLevel" label="运行等级" /> <el-table-column prop="speedLevel" :label="this.$t('planMonitor.runLevel')" />
</el-table> </el-table>
</el-row> </el-row>
<el-row> <el-row>
<el-col :offset="16"> <el-col :offset="16">
<el-checkbox v-model="showDefault">显示默认停站时间和运行等级</el-checkbox> <el-checkbox v-model="showDefault">{{$t('planMonitor.showDefaultStopTimeAndRunLevel')}}</el-checkbox>
</el-col> </el-col>
</el-row> </el-row>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button size="medium" @click="doClose"> </el-button> <el-button size="medium" @click="doClose">{{$t('global.cancel')}}</el-button>
<el-button type="primary" size="medium" @click="handleCommit"> </el-button> <el-button type="primary" size="medium" @click="handleCommit">{{$t('global.confirm')}}</el-button>
</span> </span>
</el-dialog> </el-dialog>
</template> </template>
@ -168,14 +168,14 @@ export default {
routingList: [], routingList: [],
arriveConfigList: [] arriveConfigList: []
}, },
tripNumberList: [{ value: '', label: '自动' }], tripNumberList: [{ value: '', label: this.$t('planMonitor.automatic') }],
defaultStopTimeList: [{ value: '', label: '默认' }], defaultStopTimeList: [{ value: '', label: this.$t('planMonitor.default') }],
defaultSpeedLevelList: [{ value: '', label: '默认' }] defaultSpeedLevelList: [{ value: '', label: this.$t('planMonitor.default') }]
}; };
}, },
computed: { computed: {
title() { title() {
return '添加任务'; return this.$t('planMonitor.addTask');
} }
}, },
watch: { watch: {
@ -240,7 +240,7 @@ export default {
if (stopStationObj.runPlanLevelVO) { if (stopStationObj.runPlanLevelVO) {
runTime = parseInt(stopStationObj.runPlanLevelVO[runLevel]); runTime = parseInt(stopStationObj.runPlanLevelVO[runLevel]);
} else { } else {
this.$messageBox(`请先设置开始区段 ${stopStationObj.startSectionCode} 终到区段 ${stopStationObj.endSectionCode} 的站间运行时间`); this.$messageBox(this.$t('planMonitor.addTaskHint1')+stopStationObj.startSectionCode+this.$t('planMonitor.addTaskHint2')+stopStationObj.endSectionCode+this.$t('planMonitor.addTaskHint3'));
} }
} }
} }
@ -257,8 +257,8 @@ export default {
list.forEach((elem, index) => { list.forEach((elem, index) => {
elem.arriveTime = index ? formatTime(tempTime) : ''; elem.arriveTime = index ? formatTime(tempTime) : '';
elem.departureTime = index == list.length - 1 ? '' : formatTime(tempTime + waitTime); elem.departureTime = index == list.length - 1 ? '' : formatTime(tempTime + waitTime);
elem.stopTime = this.addModel.defaultSpeedLevel || '默认'; elem.stopTime = this.addModel.defaultSpeedLevel || this.$t('planMonitor.default');
elem.speedLevel = this.addModel.defaultStopTime || '默认'; elem.speedLevel = this.addModel.defaultStopTime || this.$t('planMonitor.default');
tempTime = tempTime + waitTime + this.compuntedRunTime(list, index, runLevel); tempTime = tempTime + waitTime + this.compuntedRunTime(list, index, runLevel);
}); });
@ -294,9 +294,9 @@ export default {
this.$emit('dispatchOperate', { this.$emit('dispatchOperate', {
dialogName: 'openRunPlan', operate: 'loadRunPlanData', params: Object.assign({refresh: true}, this.$route.query) dialogName: 'openRunPlan', operate: 'loadRunPlanData', params: Object.assign({refresh: true}, this.$route.query)
}); });
this.$message.success('添加任务成功!'); this.$message.success(this.$t('tip.addTaskSuccessfully'));
}).catch(() => { }).catch(() => {
this.$messageBox('添加任务失败'); this.$messageBox(this.$t('tip.addTaskFailed'));
}); });
} }

View File

@ -12,19 +12,19 @@
> >
<div> <div>
<el-tabs v-model="activeTab" type="card"> <el-tabs v-model="activeTab" type="card">
<el-tab-pane label="正常新建" name="first"> <el-tab-pane :label="this.$t('planMonitor.normalNew')" name="first">
<el-row> <el-row>
<el-form ref="form" :model="newModel" label-width="140px" size="mini" :rules="rules" @submit.native.prevent> <el-form ref="form" :model="newModel" label-width="140px" size="mini" :rules="rules" @submit.native.prevent>
<el-form-item label="运行图名称:" prop="name"> <el-form-item :label="this.$t('planMonitor.runGraphName')+this.$t('global.colon')" prop="name">
<el-input v-model="newModel.name" autofocus /> <el-input v-model="newModel.name" autofocus />
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-row> </el-row>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="从发布运行图创建" name="second"> <el-tab-pane :label="this.$t('planMonitor.createFromTheReleaseRunGraph')" name="second">
<el-row> <el-row>
<el-form ref="pullForm" :model="pullModel" label-width="140px" size="mini" :rules="pullRules" @submit.native.prevent> <el-form ref="pullForm" :model="pullModel" label-width="140px" size="mini" :rules="pullRules" @submit.native.prevent>
<el-form-item label="发布运行图" prop="templateId"> <el-form-item :label="this.$t('planMonitor.releaseRunGraph')" prop="templateId">
<el-select v-model="pullModel.templateId" :placeholder="$t('map.pleaseSelect')"> <el-select v-model="pullModel.templateId" :placeholder="$t('map.pleaseSelect')">
<el-option <el-option
v-for="item in publishMapList" v-for="item in publishMapList"
@ -34,7 +34,7 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="运行图名称:" prop="name"> <el-form-item :label="this.$t('planMonitor.runGraphName')+this.$t('global.colon')" prop="name">
<el-input v-model="pullModel.name" autofocus /> <el-input v-model="pullModel.name" autofocus />
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -76,22 +76,22 @@ export default {
}, },
computed: { computed: {
title() { title() {
return '新建运行图'; return this.$t('planMonitor.newRunGraph');
}, },
rules() { rules() {
return { return {
name: [ name: [
{ required: true, message: '请输入运行图名称', trigger: 'blur' } { required: true, message: this.$t('rules.enterTheNameOfTheRunGraph'), trigger: 'blur' }
] ]
}; };
}, },
pullRules() { pullRules() {
return { return {
templateId: [ templateId: [
{ required: true, message: '请选择发布运行图', trigger: 'change' } { required: true, message: this.$t('rules.chooseToPublishTheRunGraph'), trigger: 'change' }
], ],
name: [ name: [
{ required: true, message: '请输入运行图名称', trigger: 'blur' } { required: true, message: this.$t('rules.enterTheNameOfTheRunGraph'), trigger: 'blur' }
] ]
}; };
} }
@ -137,11 +137,11 @@ export default {
this.$emit('dispatchOperate', params); this.$emit('dispatchOperate', params);
// this.$emit('dispatchDialog', { name: 'openRunPlan', params: {type: 'add'} }); // this.$emit('dispatchDialog', { name: 'openRunPlan', params: {type: 'add'} });
this.$message.success('创建空运行图成功!'); this.$message.success(this.$t('tip.createAnEmptyRunGraphSuccessfully'));
this.jump(resp.data, this.newModel.name); this.jump(resp.data, this.newModel.name);
this.doClose(); this.doClose();
}).catch((error) => { }).catch((error) => {
this.$messageBox('创建运行图失败:' + error.message); this.$messageBox(this.$t('error.createOperationGraphFailed')+ this.$t('global.colon') + error.message);
this.doClose(); this.doClose();
}); });
} }
@ -152,11 +152,11 @@ export default {
this.loading = true; this.loading = true;
postCreatePlan(this.pullModel).then(resp => { postCreatePlan(this.pullModel).then(resp => {
// this.$emit('dispatchDialog', { name: 'openRunPlan', params: {type: 'add'} }); // this.$emit('dispatchDialog', { name: 'openRunPlan', params: {type: 'add'} });
this.$message.success('创建运行图成功!'); this.$message.success(this.$t('tip.createARunGraphSuccessfully'));
this.jump(resp.data, this.pullModel.name); this.jump(resp.data, this.pullModel.name);
this.doClose(); this.doClose();
}).catch((error) => { }).catch((error) => {
this.$messageBox('创建运行图失败:' + error.message); this.$messageBox(this.$t('error.createOperationGraphFailed')+ this.$t('global.colon') + error.message);
this.doClose(); this.doClose();
}); });
} }

View File

@ -11,14 +11,14 @@
:close-on-click-modal="false" :close-on-click-modal="false"
> >
<el-row> <el-row>
<el-radio v-model="model.deleteBefore" :label="true">删除以前所有任务包含本任务</el-radio> <el-radio v-model="model.deleteBefore" :label="true">{{$t('planMonitor.deleteAllPreviousTasks')}}</el-radio>
</el-row> </el-row>
<el-row> <el-row>
<el-radio v-model="model.deleteBefore" :label="false">删除以后所有任务包含本任务</el-radio> <el-radio v-model="model.deleteBefore" :label="false">{{$t('planMonitor.deleteAllSubsequentTasks')}}</el-radio>
</el-row> </el-row>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button size="medium" @click="doClose"> </el-button> <el-button size="medium" @click="doClose">{{$t('global.cancel')}}</el-button>
<el-button type="primary" size="medium" @click="handleCommit"> </el-button> <el-button type="primary" size="medium" @click="handleCommit">{{$t('global.confirm')}}</el-button>
</span> </span>
</el-dialog> </el-dialog>
</template> </template>
@ -45,7 +45,7 @@ export default {
}, },
computed: { computed: {
title() { title() {
return '删除任务'; return this.$t('planMonitor.deleteTask');
} }
}, },
mounted() { mounted() {
@ -79,9 +79,9 @@ export default {
this.$emit('dispatchOperate', { this.$emit('dispatchOperate', {
dialogName: 'openRunPlan', operate: 'loadRunPlanData', params: Object.assign({refresh: true}, this.$route.query) dialogName: 'openRunPlan', operate: 'loadRunPlanData', params: Object.assign({refresh: true}, this.$route.query)
}); });
this.$message.success('删除任务成功!'); this.$message.success(this.$t('tip.deleteTaskSuccessfully'));
}).catch(() => { }).catch(() => {
this.$messageBox('删除任务失败'); this.$messageBox(this.$t('tip.deleteTaskFailed'));
}); });
} }
this.doClose(); this.doClose();

View File

@ -12,26 +12,26 @@
> >
<el-row type="flex" justify="center"> <el-row type="flex" justify="center">
<el-radio-group v-model="model.forward"> <el-radio-group v-model="model.forward">
<el-radio :label="true">向前</el-radio> <el-radio :label="true">{{$t('planMonitor.forward')}}</el-radio>
<el-radio :label="false">向后</el-radio> <el-radio :label="false">{{$t('planMonitor.backward')}}</el-radio>
</el-radio-group> </el-radio-group>
</el-row> </el-row>
<el-row style="margin-top: 20px"> <el-row style="margin-top: 20px">
<el-col :span="5" :offset="4">次数</el-col> <el-col :span="5" :offset="4">{{$t('planMonitor.frequency')}}</el-col>
<el-col :span="10"> <el-col :span="10">
<el-input-number v-model="model.times" size="mini" controls-position="right" /> <el-input-number v-model="model.times" size="mini" controls-position="right" />
</el-col> </el-col>
</el-row> </el-row>
<el-row style="margin: 10px 0px"> <el-row style="margin: 10px 0px">
<el-col :span="5" :offset="4">间隔时间</el-col> <el-col :span="5" :offset="4">{{$t('planMonitor.intervals')}}</el-col>
<el-col :span="10"> <el-col :span="10">
<el-input-number v-model="model.intervals" size="mini" controls-position="right" /> <el-input-number v-model="model.intervals" size="mini" controls-position="right" />
<span></span> <span>{{$t('global.second')}}</span>
</el-col> </el-col>
</el-row> </el-row>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button size="medium" @click="doClose"> </el-button> <el-button size="medium" @click="doClose">{{$t('global.cancel')}}</el-button>
<el-button type="primary" size="medium" @click="handleCommit"> </el-button> <el-button type="primary" size="medium" @click="handleCommit">{{$t('global.confirm')}}</el-button>
</span> </span>
</el-dialog> </el-dialog>
</template> </template>
@ -57,7 +57,7 @@ export default {
}, },
computed: { computed: {
title() { title() {
return '复制列车'; return this.$t('planMonitor.duplicateTrain');
} }
}, },
mounted() { mounted() {
@ -79,9 +79,9 @@ export default {
this.$emit('dispatchOperate', { this.$emit('dispatchOperate', {
dialogName: 'openRunPlan', operate: 'loadRunPlanData', params: Object.assign({refresh: true}, this.$route.query) dialogName: 'openRunPlan', operate: 'loadRunPlanData', params: Object.assign({refresh: true}, this.$route.query)
}); });
this.$message.success('复制计划成功!'); this.$message.success(this.$t('tip.duplicatePlanSuccessful'));
}).catch(() => { }).catch(() => {
this.$messageBox('复制计划失败'); this.$messageBox(this.$t('tip.duplicatePlanFailed'));
}); });
} }
} }

View File

@ -13,15 +13,15 @@
<div> <div>
<el-row> <el-row>
<el-form ref="form" :model="editModel" label-width="140px" size="mini" :rules="rules" @submit.native.prevent> <el-form ref="form" :model="editModel" label-width="140px" size="mini" :rules="rules" @submit.native.prevent>
<el-form-item label="运行图名称:" prop="name"> <el-form-item :label="this.$t('planMonitor.runGraphName')+this.$t('global.colon')" prop="name">
<el-input v-model="editModel.name" autofocus /> <el-input v-model="editModel.name" autofocus />
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-row> </el-row>
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button type="primary" :loading="loading" @click="handleEdit">修改</el-button> <el-button type="primary" :loading="loading" @click="handleEdit">{{$t('global.modify')}}</el-button>
<el-button @click="doClose">{{ $t('map.cancel') }}</el-button> <el-button @click="doClose">{{ $t('global.cancel') }}</el-button>
</span> </span>
</el-dialog> </el-dialog>
</template> </template>
@ -47,12 +47,12 @@ export default {
}, },
computed: { computed: {
title() { title() {
return '修改运行图名称'; return this.$t('planMonitor.modifyRunningDiagramName');
}, },
rules() { rules() {
return { return {
name: [ name: [
{ required: true, message: '请输入运行图名称', trigger: 'blur' } { required: true, message: this.$t('rules.enterTheNameOfTheRunGraph'), trigger: 'blur' }
] ]
}; };
} }
@ -88,11 +88,11 @@ export default {
}; };
this.$emit('dispatchOperate', params); this.$emit('dispatchOperate', params);
this.$message.success('修改运行图名称成功!'); this.$message.success(this.$t('planMonitor.runGraphNameModifiedSuccessfully'));
this.$emit('renewal'); this.$emit('renewal');
this.doClose(); this.doClose();
}).catch(() => { }).catch(() => {
this.$messageBox('修改运行图名称失败'); this.$messageBox(this.$t('planMonitor.modifyRunGraphNameFailed'));
this.doClose(); this.doClose();
}); });
} }

View File

@ -11,16 +11,16 @@
:close-on-click-modal="false" :close-on-click-modal="false"
> >
<el-row> <el-row>
<el-col :span="3"> 表号 </el-col> <el-col :span="3">{{$t('planMonitor.serviceNumber')+$t('global.colon')}}</el-col>
<el-col :span="4"> <el-col :span="4">
<el-input v-model="model.serviceNumber" disabled size="mini" /> <el-input v-model="model.serviceNumber" disabled size="mini" />
</el-col> </el-col>
<el-col :span="4" :offset="1"> <el-col :span="4" :offset="1">
<el-checkbox v-model="model.debugTrain">调试车</el-checkbox> <el-checkbox v-model="model.debugTrain">{{$t('planMonitor.commissioningTrain')}}</el-checkbox>
</el-col> </el-col>
</el-row> </el-row>
<el-row style="margin-top: 5px"> <el-row style="margin-top: 5px">
任务 {{$t('planMonitor.task')}}
</el-row> </el-row>
<el-row> <el-row>
<div style=" float: left; width: 78%"> <div style=" float: left; width: 78%">
@ -31,22 +31,22 @@
:height="380" :height="380"
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
> >
<el-table-column prop="beginStationCode" label="起始站"> <el-table-column prop="beginStationCode" :label="this.$t('planMonitor.startingStation')">
<template slot-scope="scope"> <template slot-scope="scope">
{{ formatName(scope.row.startStationCode) }} {{ formatName(scope.row.startStationCode) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="startTime" label="起始时间"> <el-table-column prop="startTime" :label="this.$t('planMonitor.startTime')">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.startTime }} {{ scope.row.startTime }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="endStationCode" label="终到站"> <el-table-column prop="endStationCode" :label="this.$t('planMonitor.terminal')">
<template slot-scope="scope"> <template slot-scope="scope">
{{ formatName(scope.row.endStationCode) }} {{ formatName(scope.row.endStationCode) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="endTime" label="终到时间"> <el-table-column prop="endTime" :label="this.$t('planMonitor.endTime')">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.endTime }} {{ scope.row.endTime }}
</template> </template>
@ -55,12 +55,12 @@
</el-table> </el-table>
</div> </div>
<div style="float: right; width: 22%"> <div style="float: right; width: 22%">
<el-button class="view-button" :disabled="disabled" @click="handleEditTask">编辑任务</el-button> <el-button class="view-button" :disabled="disabled" @click="handleEditTask">{{$t('planMonitor.modifyTask')}}</el-button>
<el-button class="view-button" :disabled="disabled" @click="handleAddTask"> <el-button class="view-button" :disabled="disabled" @click="handleAddTask">
增加任务 {{$t('planMonitor.addTask')}}
</el-button> </el-button>
<el-button class="view-button" :disabled="disabled" @click="handleDeleteTask">删除任务</el-button> <el-button class="view-button" :disabled="disabled" @click="handleDeleteTask">{{$t('planMonitor.deleteTask')}}</el-button>
<el-button class="view-button" :disabled="disabled" @click="handleCommit">确定</el-button> <el-button class="view-button" :disabled="disabled" @click="handleCommit">{{$t('global.confirm')}}</el-button>
</div> </div>
</el-row> </el-row>
</el-dialog> </el-dialog>
@ -87,7 +87,7 @@ export default {
}, },
computed: { computed: {
title() { title() {
return '编辑计划车'; return this.$t('planMonitor.editPlanningTrain');
}, },
disabled() { disabled() {
return !this.model.serviceNumber; return !this.model.serviceNumber;
@ -155,7 +155,7 @@ export default {
} }
}); });
} else { } else {
this.$messageBox('请选择一条数据'); this.$messageBox(this.$t('tip.selectAPieceOfData'));
} }
}, },
handleDeleteTask() { handleDeleteTask() {
@ -169,7 +169,7 @@ export default {
} }
}); });
} else { } else {
this.$messageBox('请选择一条数据'); this.$messageBox(this.$t('tip.selectAPieceOfData'));
} }
}, },
handleConfirmAddTask(model) { handleConfirmAddTask(model) {
@ -212,9 +212,9 @@ export default {
this.$emit('dispatchOperate', { this.$emit('dispatchOperate', {
dialogName: 'openRunPlan', operate: 'loadRunPlanData', params: Object.assign({refresh: true}, this.$route.query) dialogName: 'openRunPlan', operate: 'loadRunPlanData', params: Object.assign({refresh: true}, this.$route.query)
}); });
this.$message.success('创建计划成功'); this.$message.success(this.$t('tip.planCreationSuccessful'));
}).catch(() => { }).catch(() => {
this.$messageBox('创建计划失败'); this.$messageBox(this.$t('tip.createPlanFailed'));
}); });
} }
} }