Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
1bd1af2df3
@ -152,6 +152,23 @@ export function deleteRoutingData(routingId) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 保存用户配置 (新版)*/
|
||||||
|
export function addRunplanConfig(mapId, data) {
|
||||||
|
return request({
|
||||||
|
url: `/api/runPlan/userData/${mapId}/config`,
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 获取用户配置(新版)*/
|
||||||
|
export function getRunplanConfig(mapId) {
|
||||||
|
return request({
|
||||||
|
url: `/api/runPlan/userData/${mapId}/config`,
|
||||||
|
method: 'get'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/** 获取交路详情(新版)*/
|
/** 获取交路详情(新版)*/
|
||||||
export function getRoutingData(routingId) {
|
export function getRoutingData(routingId) {
|
||||||
return request({
|
return request({
|
||||||
|
@ -147,10 +147,19 @@ export function checkServiceNumberExist({ planId, serviceNumber }) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 查询交路列表*/
|
// /** 查询交路列表*/
|
||||||
export function getRoutingList(planId) {
|
// export function getRoutingList(planId) {
|
||||||
|
// return request({
|
||||||
|
// url: `/api/runPlan/draft/${planId}/routingList`,
|
||||||
|
// method: 'get'
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
|
||||||
|
/** 查询用户交路数据 (新版)*/
|
||||||
|
export function listUserRoutingData(mapId) {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/runPlan/draft/${planId}/routingList`,
|
// url: `/api/mapBuild/${mapId}/routingData`,
|
||||||
|
url: `/api/runPlan/userData/${mapId}/routing`,
|
||||||
method: 'get'
|
method: 'get'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -233,10 +242,19 @@ export function updatePlanTrip(data) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 根据车次号查询交路*/
|
/** 根据车次号查询交路 */
|
||||||
export function getRoutingBySDTNumber(params) {
|
export function getRoutingBySDTNumber(params) {
|
||||||
|
// 旧版
|
||||||
|
// return request({
|
||||||
|
// url: `/api/runPlan/draft/${params.planId}/routing`,
|
||||||
|
// method: 'get',
|
||||||
|
// params: {
|
||||||
|
// SDTNumber: params.SDTNumber
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// 新版
|
||||||
return request({
|
return request({
|
||||||
url: `/api/runPlan/draft/${params.planId}/routing`,
|
url: `/api/runPlan/draft/${params.planId}/userRouting`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: {
|
params: {
|
||||||
SDTNumber: params.SDTNumber
|
SDTNumber: params.SDTNumber
|
||||||
@ -252,6 +270,15 @@ export function updateServiceNumber(planId, serviceNumber, newServiceNumber) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 生成计划(新版)*/
|
||||||
|
export function generatePlanTrain(planId, data) {
|
||||||
|
return request({
|
||||||
|
url: `/api/runPlan/draft/${planId}/service/generate`,
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/** 修改任务车次号*/
|
/** 修改任务车次号*/
|
||||||
export function updateTripNumber(planId, SDTNumber, tripNumber) {
|
export function updateTripNumber(planId, SDTNumber, tripNumber) {
|
||||||
return request({
|
return request({
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-form ref="form" :rules="rules" :model="formModel" :inline="inline" :label-width="form.labelWidth" @submit.native.prevent>
|
<el-form ref="form" :rules="rules" :model="formModel" :inline="inline" :label-width="form.labelWidth" :size="form.size?form.size:'medium'" @submit.native.prevent>
|
||||||
<template v-for="item in form.items">
|
<template v-for="item in form.items">
|
||||||
<template v-if="checkFieldType(item, 'text')">
|
<template v-if="checkFieldType(item, 'text')">
|
||||||
<el-form-item :key="item.prop" :prop="item.prop" :label="item.label" :required="item.required">
|
<el-form-item :key="item.prop" :prop="item.prop" :label="item.label" :required="item.required">
|
||||||
|
@ -81,6 +81,7 @@ export default {
|
|||||||
modifySuccess: 'Modify Success',
|
modifySuccess: 'Modify Success',
|
||||||
modifyFailed: 'Modify Failed',
|
modifyFailed: 'Modify Failed',
|
||||||
modifyRunLevel: 'Modify run level',
|
modifyRunLevel: 'Modify run level',
|
||||||
|
modifyStopTime:'Modify stop time',
|
||||||
|
|
||||||
startStationTips: 'Start station departure time unchanged',
|
startStationTips: 'Start station departure time unchanged',
|
||||||
endStationTips: 'End station departure time unchanged',
|
endStationTips: 'End station departure time unchanged',
|
||||||
@ -142,7 +143,7 @@ export default {
|
|||||||
afterTheTrainHasBackInterval: 'After the train has a back interval',
|
afterTheTrainHasBackInterval: 'After the train has a back interval',
|
||||||
secondsCanBeRunnedByTrain: 'seconds can be runned by train',
|
secondsCanBeRunnedByTrain: 'seconds can be runned by train',
|
||||||
defaultStopTime: 'Default stop time:',
|
defaultStopTime: 'Default stop time:',
|
||||||
defaultRunLevel: 'Default run level:',
|
defaultRunLevel: 'Run level:',
|
||||||
stopTime: 'Stop time',
|
stopTime: 'Stop time',
|
||||||
runLevel: 'Run level',
|
runLevel: 'Run level',
|
||||||
platform: 'Platform',
|
platform: 'Platform',
|
||||||
@ -236,5 +237,6 @@ export default {
|
|||||||
modifyName: 'Modify name',
|
modifyName: 'Modify name',
|
||||||
applyRelease:'Apply for release',
|
applyRelease:'Apply for release',
|
||||||
preview:'Preview',
|
preview:'Preview',
|
||||||
revoke:'Revoke'
|
revoke:'Revoke',
|
||||||
|
gerneratePlan:'Gernerate plan'
|
||||||
};
|
};
|
||||||
|
@ -39,7 +39,7 @@ export default {
|
|||||||
continuationPlan: '延续计划',
|
continuationPlan: '延续计划',
|
||||||
firstTrain: '首班车',
|
firstTrain: '首班车',
|
||||||
serialNumber: '序列号:',
|
serialNumber: '序列号:',
|
||||||
defaultRunLevel: '缺省运行等级:',
|
defaultRunLevel: '运行等级:',
|
||||||
startTime: '开始时间',
|
startTime: '开始时间',
|
||||||
selectTime: '选择时间',
|
selectTime: '选择时间',
|
||||||
inStock: '入库',
|
inStock: '入库',
|
||||||
@ -81,6 +81,7 @@ export default {
|
|||||||
modifySuccess: '修改成功!',
|
modifySuccess: '修改成功!',
|
||||||
modifyFailed: '修改失败',
|
modifyFailed: '修改失败',
|
||||||
modifyRunLevel: '修改运行等级',
|
modifyRunLevel: '修改运行等级',
|
||||||
|
modifyStopTime:'修改停站时间',
|
||||||
|
|
||||||
startStationTips: '起始站发车时间不变',
|
startStationTips: '起始站发车时间不变',
|
||||||
endStationTips: '终到站到达时间不变',
|
endStationTips: '终到站到达时间不变',
|
||||||
@ -239,5 +240,6 @@ export default {
|
|||||||
modifyName: '修改名称',
|
modifyName: '修改名称',
|
||||||
applyRelease:'申请发布',
|
applyRelease:'申请发布',
|
||||||
preview:'预览',
|
preview:'预览',
|
||||||
revoke:'撤回'
|
revoke:'撤回',
|
||||||
|
gerneratePlan:'生成计划'
|
||||||
};
|
};
|
||||||
|
@ -45,6 +45,7 @@
|
|||||||
<populating-generic-data ref="populatingGenericData" :load-run-plan-id="loadRunPlanId" />
|
<populating-generic-data ref="populatingGenericData" :load-run-plan-id="loadRunPlanId" />
|
||||||
<create-empty-plan ref="createEmptyPlan" @refresh="refreshRunPlanList" />
|
<create-empty-plan ref="createEmptyPlan" @refresh="refreshRunPlanList" />
|
||||||
<edit-plan-name ref="editPlan" @renewal="refreshRunPlanName" />
|
<edit-plan-name ref="editPlan" @renewal="refreshRunPlanName" />
|
||||||
|
<gernarate-plan ref="gernaratePlanTrain" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -65,6 +66,7 @@ import ModifyingTask from './menus/modifyingTask';
|
|||||||
import ModifyingRouting from './menus/modifyingRouting';
|
import ModifyingRouting from './menus/modifyingRouting';
|
||||||
import ModifyingBeginTime from './menus/modifyingBeginTime';
|
import ModifyingBeginTime from './menus/modifyingBeginTime';
|
||||||
import EditStationBetweenTime from './menus/editStationBetweenTime';
|
import EditStationBetweenTime from './menus/editStationBetweenTime';
|
||||||
|
import GernaratePlan from './menus/gernaratePlanTrain';
|
||||||
// import AddSmoothRunTime from './menus/addSmoothRunTime';
|
// import AddSmoothRunTime from './menus/addSmoothRunTime';
|
||||||
// import EditSmoothRunTime from './menus/editSmoothRunTime';
|
// import EditSmoothRunTime from './menus/editSmoothRunTime';
|
||||||
import ModifyingStationIntervalTime from './menus/modifyingStationIntervalTime';
|
import ModifyingStationIntervalTime from './menus/modifyingStationIntervalTime';
|
||||||
@ -100,7 +102,8 @@ export default {
|
|||||||
ModifyingStationIntervalTime,
|
ModifyingStationIntervalTime,
|
||||||
ModifyingStationStopTime,
|
ModifyingStationStopTime,
|
||||||
CreateEmptyPlan,
|
CreateEmptyPlan,
|
||||||
EditPlanName
|
EditPlanName,
|
||||||
|
GernaratePlan
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -116,6 +116,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import routeMap from './routingoperate/routeMap';
|
import routeMap from './routingoperate/routeMap';
|
||||||
|
// import RunplanParams from './config/index';
|
||||||
import { planEffectiveCheck, runPlanNotify } from '@/api/runplan';
|
import { planEffectiveCheck, runPlanNotify } from '@/api/runplan';
|
||||||
import { launchFullscreen } from '@/utils/screen';
|
import { launchFullscreen } from '@/utils/screen';
|
||||||
import { UrlConfig } from '@/scripts/ConstDic';
|
import { UrlConfig } from '@/scripts/ConstDic';
|
||||||
@ -177,18 +178,14 @@ export default {
|
|||||||
{
|
{
|
||||||
title: this.$t('planMonitor.tool'),
|
title: this.$t('planMonitor.tool'),
|
||||||
children: [
|
children: [
|
||||||
{
|
|
||||||
title: this.$t('planMonitor.validityCheck'),
|
|
||||||
click: this.handlePlanEffectiveCheck
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: this.$t('planMonitor.testRunningDiagram'),
|
|
||||||
click: this.handleTestRunPlan
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
title: '交路设置',
|
title: '交路设置',
|
||||||
click: this.handleRoutingSettings
|
click: this.handleRoutingSettings
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: '参数配置',
|
||||||
|
click: this.handleRunplanParams
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: '停站时间',
|
title: '停站时间',
|
||||||
click: this.handleDwellTime
|
click: this.handleDwellTime
|
||||||
@ -196,6 +193,14 @@ export default {
|
|||||||
{
|
{
|
||||||
title: '运行等级',
|
title: '运行等级',
|
||||||
click: this.handleRoutingLevel
|
click: this.handleRoutingLevel
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: this.$t('planMonitor.validityCheck'),
|
||||||
|
click: this.handlePlanEffectiveCheck
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: this.$t('planMonitor.testRunningDiagram'),
|
||||||
|
click: this.handleTestRunPlan
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -213,6 +218,10 @@ export default {
|
|||||||
// {
|
// {
|
||||||
// type: 'separator'
|
// type: 'separator'
|
||||||
// },
|
// },
|
||||||
|
{
|
||||||
|
title: '生成计划',
|
||||||
|
click: this.handleGernaratePlanningTrain
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('planMonitor.addPlan'),
|
title: this.$t('planMonitor.addPlan'),
|
||||||
click: this.handleAddPlanningTrain
|
click: this.handleAddPlanningTrain
|
||||||
@ -436,7 +445,11 @@ export default {
|
|||||||
},
|
},
|
||||||
// 交路设置
|
// 交路设置
|
||||||
handleRoutingSettings() {
|
handleRoutingSettings() {
|
||||||
this.$refs.routeMap.doShow();
|
this.$refs.routeMap.doShow('routeMap');
|
||||||
|
},
|
||||||
|
// 运行图配置文件
|
||||||
|
handleRunplanParams() {
|
||||||
|
this.$refs.routeMap.doShow('runplanParams');
|
||||||
},
|
},
|
||||||
// 停站时间
|
// 停站时间
|
||||||
handleDwellTime() {
|
handleDwellTime() {
|
||||||
@ -446,6 +459,10 @@ export default {
|
|||||||
handleRoutingLevel() {
|
handleRoutingLevel() {
|
||||||
this.$emit('dispatchDialog', { name: 'modifyingStationIntervalTime', params: {} });
|
this.$emit('dispatchDialog', { name: 'modifyingStationIntervalTime', params: {} });
|
||||||
},
|
},
|
||||||
|
// 生成计划
|
||||||
|
handleGernaratePlanningTrain() {
|
||||||
|
this.$emit('dispatchDialog', { name: 'gernaratePlanTrain', params: {} });
|
||||||
|
},
|
||||||
// 校验运行图
|
// 校验运行图
|
||||||
handlePlanEffectiveCheck() {
|
handlePlanEffectiveCheck() {
|
||||||
const planId = this.$route.query.planId;
|
const planId = this.$route.query.planId;
|
||||||
|
@ -12,14 +12,14 @@
|
|||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
>
|
>
|
||||||
<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.forward" :label="true">{{ $t('planMonitor.addToTheFront') }}</el-radio>
|
<el-radio v-model="addModel.forward" :label="true">{{ $t('planMonitor.addToTheFront') }}</el-radio>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
<el-col :span="3" style="margin-left: 10px;height: 28px;line-height: 28px;">
|
<el-col :span="3" style="margin-left: 10px;height: 28px;line-height: 28px;">
|
||||||
<span>{{ $t('planMonitor.tripNumber')+$t('global.colon') }}</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="this.$t('global.choose')">
|
<el-select v-model="addModel.tripNumber" size="mini" :placeholder="this.$t('global.choose')" disabled>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in tripNumberList"
|
v-for="item in tripNumberList"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
@ -36,15 +36,15 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</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.forward" :label="false">{{ $t('planMonitor.addToTheEnd') }}</el-radio>
|
<el-radio v-model="addModel.forward" :label="false">{{ $t('planMonitor.addToTheEnd') }}</el-radio>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
<el-col :span="3" style="margin-left: 10px;height: 28px;line-height: 28px;">
|
<!-- <el-col :span="3" style="margin-left: 10px;height: 28px;line-height: 28px;">
|
||||||
<span>{{ $t('planMonitor.defaultStopTime') }}</span>
|
<span>{{ $t('planMonitor.defaultStopTime') }}</span>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="5">
|
<el-col :span="5">
|
||||||
<el-input-number v-model="defaultStopTime" placeholder="请输入时间" size="mini" :controls="false" :min="0" />
|
<el-input-number v-model="defaultStopTime" placeholder="请输入时间" size="mini" :controls="false" :min="0" /> -->
|
||||||
<!-- <el-select v-model="defaultStopTime" size="mini" :placeholder="this.$t('global.choose')">
|
<!-- <el-select v-model="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,8 +52,8 @@
|
|||||||
:value="item.value"
|
:value="item.value"
|
||||||
/>
|
/>
|
||||||
</el-select> -->
|
</el-select> -->
|
||||||
</el-col>
|
<!-- </el-col> -->
|
||||||
<el-col :span="3" style="margin-left: 20px;height: 28px;line-height: 28px;">
|
<el-col :span="3" style="margin-left:10px;height: 28px;line-height: 28px;">
|
||||||
<span>{{ $t('planMonitor.defaultRunLevel') }}</span>
|
<span>{{ $t('planMonitor.defaultRunLevel') }}</span>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="5">
|
<el-col :span="5">
|
||||||
@ -129,27 +129,38 @@
|
|||||||
{{ formatName(scope.row.sectionCode) }}
|
{{ formatName(scope.row.sectionCode) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="arriveTime" :label="this.$t('planMonitor.arriveTime')" width="100px" />
|
<!-- prop="arriveTime" -->
|
||||||
<!-- prop="stopTime" -->
|
<el-table-column :label="this.$t('planMonitor.arriveTime')" width="100px">
|
||||||
<el-table-column :label="this.$t('planMonitor.stopTime')" width="100px">
|
<template v-if="scope.$index!=0" slot-scope="scope">
|
||||||
<template slot-scope="scope">
|
{{ scope.row.arriveTime }}
|
||||||
<el-input v-model="scope.row.stopTime" placeholder="请输入时间" size="mini" @input="changeStopTime(scope.$index, scope.row.stopTime)" />
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<!-- prop="stopTime" -->
|
||||||
|
<el-table-column :label="this.$t('planMonitor.stopTime')" width="100px">
|
||||||
|
<template v-if="scope.$index!=0&&scope.$index!=addModel.arriveConfigList.length-1" slot-scope="scope">
|
||||||
|
{{ scope.row.stopTime+'s' }}
|
||||||
|
<!-- <el-input v-model="scope.row.stopTime" placeholder="请输入时间" size="mini" @input="changeStopTime(scope.$index, scope.row.stopTime)" /> -->
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column :label="this.$t('planMonitor.departureTime')" width="100px">
|
||||||
|
<template v-if="scope.$index!=addModel.arriveConfigList.length-1" slot-scope="scope">
|
||||||
|
{{ scope.row.departureTime }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="departureTime" :label="this.$t('planMonitor.departureTime')" width="100px" />
|
|
||||||
<el-table-column :label="this.$t('planMonitor.runLevel')">
|
<el-table-column :label="this.$t('planMonitor.runLevel')">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span style="font-size:13px;">{{ scope.row.speedLevel }}</span>
|
<span style="font-size:13px;">{{ scope.row.speedLevel }}</span>
|
||||||
<el-input v-model="scope.row.speedLevelTime" style="width:70px" placeholder="请输入运行等级" size="mini" @input="changeSpeedLevelTime(scope.$index, scope.row.speedLevelTime)" />
|
<span>{{ '('+scope.row.speedLevelTime+'s)' }}</span>
|
||||||
|
<!-- <el-input v-model="scope.row.speedLevelTime" style="width:70px" placeholder="请输入运行等级" size="mini" @input="changeSpeedLevelTime(scope.$index, scope.row.speedLevelTime)" /> -->
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</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">{{ $t('planMonitor.showDefaultStopTimeAndRunLevel') }}</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">{{ $t('global.cancel') }}</el-button>
|
<el-button size="medium" @click="doClose">{{ $t('global.cancel') }}</el-button>
|
||||||
<el-button type="primary" size="medium" @click="handleCommit">{{ $t('global.confirm') }}</el-button>
|
<el-button type="primary" size="medium" @click="handleCommit">{{ $t('global.confirm') }}</el-button>
|
||||||
@ -158,7 +169,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getRoutingList, addPlanTrip, getMapStationRun } from '@/api/runplan';
|
import { listUserRoutingData, addPlanTrip, getMapStationRunUser, getStationStopTime } from '@/api/runplan';
|
||||||
import { formatTime, formatName } from '@/utils/runPlan';
|
import { formatTime, formatName } from '@/utils/runPlan';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -170,16 +181,17 @@ export default {
|
|||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
isPlan: false,
|
isPlan: false,
|
||||||
showDefault: true,
|
// showDefault: true,
|
||||||
stopStationMap: {},
|
stopStationMap: {},
|
||||||
|
stopTimeMap:{},
|
||||||
params: {},
|
params: {},
|
||||||
routingList: [],
|
routingList: [],
|
||||||
startStationFilters:[],
|
startStationFilters:[],
|
||||||
endStationFilters:[],
|
endStationFilters:[],
|
||||||
defaultStopTime: '30',
|
// defaultStopTime: '30',
|
||||||
defaultSpeedLevel: 'l3',
|
defaultSpeedLevel: 'l1',
|
||||||
addModel: {
|
addModel: {
|
||||||
forward: false,
|
// forward: false,
|
||||||
routingCode: '',
|
routingCode: '',
|
||||||
endStationCode: '',
|
endStationCode: '',
|
||||||
startStationCode: '',
|
startStationCode: '',
|
||||||
@ -215,9 +227,9 @@ export default {
|
|||||||
'addModel.startTime': function () {
|
'addModel.startTime': function () {
|
||||||
this.computedDetailList();
|
this.computedDetailList();
|
||||||
},
|
},
|
||||||
'defaultStopTime': function () {
|
// 'defaultStopTime': function () {
|
||||||
this.computedDetailList('defaultStopTime');
|
// this.computedDetailList('defaultStopTime');
|
||||||
},
|
// },
|
||||||
'defaultSpeedLevel': function () {
|
'defaultSpeedLevel': function () {
|
||||||
this.computedDetailList('defaultSpeedLevel');
|
this.computedDetailList('defaultSpeedLevel');
|
||||||
}
|
}
|
||||||
@ -225,15 +237,14 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
loadInitData(params) {
|
loadInitData(params) {
|
||||||
this.isPlan = params.isPlan;
|
this.isPlan = params.isPlan;
|
||||||
// this.addModel.taskIndex = getUID('task_');
|
|
||||||
this.addModel.serviceNumber = params.serviceNumber;
|
this.addModel.serviceNumber = params.serviceNumber;
|
||||||
this.addModel.planId = this.$route.query.planId;
|
this.addModel.planId = this.$route.query.planId;
|
||||||
this.addModel.arriveConfigList = [];
|
this.addModel.arriveConfigList = [];
|
||||||
const planId = this.$route.query.planId;
|
const planId = this.$route.query.planId;
|
||||||
if (planId) {
|
if (planId) {
|
||||||
getRoutingList(planId).then(resp => {
|
const mapId = this.$route.query.mapId;
|
||||||
|
listUserRoutingData(mapId).then(resp => {
|
||||||
this.routingList = resp.data;
|
this.routingList = resp.data;
|
||||||
// debugger;
|
|
||||||
const startStationFilterMap = {};
|
const startStationFilterMap = {};
|
||||||
const endStationFilterMap = {};
|
const endStationFilterMap = {};
|
||||||
this.routingList.forEach(routing=>{
|
this.routingList.forEach(routing=>{
|
||||||
@ -263,11 +274,17 @@ export default {
|
|||||||
|
|
||||||
const mapId = this.$route.query.mapId;
|
const mapId = this.$route.query.mapId;
|
||||||
if (mapId) {
|
if (mapId) {
|
||||||
getMapStationRun(mapId).then(resp =>{
|
getMapStationRunUser(mapId).then(resp =>{
|
||||||
const list = resp.data;
|
const list = resp.data.list;
|
||||||
list.forEach(elem => {
|
list.forEach(elem => {
|
||||||
this.stopStationMap[[elem.startSectionCode, elem.endSectionCode].toString()] = elem;
|
this.stopStationMap[[elem.startSectionCode, elem.endSectionCode].toString()] = elem;
|
||||||
});
|
});
|
||||||
|
getStationStopTime(mapId).then(response=>{
|
||||||
|
const stopTimeList = response.data.list;
|
||||||
|
stopTimeList.forEach(element=>{
|
||||||
|
this.stopTimeMap[element.stationCode] = {parkingTime:element.parkingTime};
|
||||||
|
});
|
||||||
|
});
|
||||||
// if (list && list.length) {
|
// if (list && list.length) {
|
||||||
// list.forEach(elem => {
|
// list.forEach(elem => {
|
||||||
// if (!elem.runPlanLevelVO) {
|
// if (!elem.runPlanLevelVO) {
|
||||||
@ -321,73 +338,92 @@ export default {
|
|||||||
}
|
}
|
||||||
return runTime;
|
return runTime;
|
||||||
},
|
},
|
||||||
changeSpeedLevelTime(indexs, speedLevelTime) {
|
// changeSpeedLevelTime(indexs, speedLevelTime) {
|
||||||
const arriveConfigList = Object.assign([], this.addModel.arriveConfigList);
|
// const arriveConfigList = Object.assign([], this.addModel.arriveConfigList);
|
||||||
let tempTime = this.computedTimeByString(this.addModel.startTime) / 1000;
|
// let tempTime = this.computedTimeByString(this.addModel.startTime) / 1000;
|
||||||
arriveConfigList.forEach((elem, index) => {
|
// arriveConfigList.forEach((elem, index) => {
|
||||||
elem.arriveTime = index ? formatTime(tempTime) : '';
|
// elem.arriveTime = index ? formatTime(tempTime) : '';
|
||||||
if (index == indexs) { elem.speedLevelTime = speedLevelTime ? Number(speedLevelTime) : 0; }
|
// if (index == indexs) { elem.speedLevelTime = speedLevelTime ? Number(speedLevelTime) : 0; }
|
||||||
elem.arriveTime = index ? formatTime(tempTime) : '';
|
// elem.arriveTime = index ? formatTime(tempTime) : '';
|
||||||
if (index > 0) {
|
// if (index > 0) {
|
||||||
elem.departureTime = index == arriveConfigList.length - 1 ? '' : formatTime(tempTime + elem.stopTime);
|
// elem.departureTime = index == arriveConfigList.length - 1 ? '' : formatTime(tempTime + elem.stopTime);
|
||||||
} else {
|
// } else {
|
||||||
elem.departureTime = formatTime(tempTime);
|
// elem.departureTime = formatTime(tempTime);
|
||||||
}
|
// }
|
||||||
const realRunlevel = elem.speedLevelTime;
|
// const realRunlevel = elem.speedLevelTime;
|
||||||
if (index > 0) {
|
// if (index > 0) {
|
||||||
tempTime = tempTime + elem.stopTime + realRunlevel;
|
// tempTime = tempTime + elem.stopTime + realRunlevel;
|
||||||
} else {
|
// } else {
|
||||||
tempTime = tempTime + realRunlevel;
|
// tempTime = tempTime + realRunlevel;
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
this.addModel.arriveConfigList = arriveConfigList;
|
// this.addModel.arriveConfigList = arriveConfigList;
|
||||||
this.addModel.endTime = formatTime(tempTime - this.addModel.arriveConfigList[this.addModel.arriveConfigList.length - 1].stopTime);
|
// this.addModel.endTime = formatTime(tempTime - this.addModel.arriveConfigList[this.addModel.arriveConfigList.length - 1].stopTime);
|
||||||
},
|
// },
|
||||||
changeStopTime(indexs, time) {
|
// changeStopTime(indexs, time) {
|
||||||
let tempTime = this.computedTimeByString(this.addModel.startTime) / 1000;
|
// let tempTime = this.computedTimeByString(this.addModel.startTime) / 1000;
|
||||||
// const runLevel = this.defaultSpeedLevel || 'l3'; // 默认等级三
|
// // const runLevel = this.defaultSpeedLevel || 'l3'; // 默认等级三
|
||||||
const arriveConfigList = Object.assign([], this.addModel.arriveConfigList);
|
// const arriveConfigList = Object.assign([], this.addModel.arriveConfigList);
|
||||||
arriveConfigList.forEach((elem, index) => {
|
// arriveConfigList.forEach((elem, index) => {
|
||||||
if (index == indexs) { elem.stopTime = time ? Number(time) : 0; }
|
// if (index == indexs) { elem.stopTime = time ? Number(time) : 0; }
|
||||||
elem.arriveTime = index ? formatTime(tempTime) : '';
|
// elem.arriveTime = index ? formatTime(tempTime) : '';
|
||||||
// const runLevelObj = this.defaultSpeedLevelList.find(speedLevel=>{ return speedLevel.value == runLevel; });
|
// // const runLevelObj = this.defaultSpeedLevelList.find(speedLevel=>{ return speedLevel.value == runLevel; });
|
||||||
// elem.speedLevel = this.defaultSpeedLevel == 'l3' ? `${this.$t('planMonitor.default')}(${runLevelObj.label})` : runLevelObj.label;
|
// // elem.speedLevel = this.defaultSpeedLevel == 'l3' ? `${this.$t('planMonitor.default')}(${runLevelObj.label})` : runLevelObj.label;
|
||||||
if (index > 0) {
|
// if (index > 0) {
|
||||||
elem.departureTime = index == arriveConfigList.length - 1 ? '' : formatTime(tempTime + elem.stopTime);
|
// elem.departureTime = index == arriveConfigList.length - 1 ? '' : formatTime(tempTime + elem.stopTime);
|
||||||
} else {
|
// } else {
|
||||||
elem.departureTime = formatTime(tempTime);
|
// elem.departureTime = formatTime(tempTime);
|
||||||
}
|
// }
|
||||||
const realRunlevel = elem.speedLevelTime;
|
// const realRunlevel = elem.speedLevelTime;
|
||||||
if (index > 0) {
|
// if (index > 0) {
|
||||||
tempTime = tempTime + elem.stopTime + realRunlevel;
|
// tempTime = tempTime + elem.stopTime + realRunlevel;
|
||||||
} else {
|
// } else {
|
||||||
tempTime = tempTime + realRunlevel;
|
// tempTime = tempTime + realRunlevel;
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
this.addModel.arriveConfigList = arriveConfigList;
|
// this.addModel.arriveConfigList = arriveConfigList;
|
||||||
this.addModel.endTime = formatTime(tempTime - this.addModel.arriveConfigList[this.addModel.arriveConfigList.length - 1].stopTime);
|
// this.addModel.endTime = formatTime(tempTime - this.addModel.arriveConfigList[this.addModel.arriveConfigList.length - 1].stopTime);
|
||||||
},
|
// },
|
||||||
computedDetailList(type = null) {
|
computedDetailList(type = null) {
|
||||||
if (this.addModel.routingCode) {
|
if (this.addModel.routingCode) {
|
||||||
const list = Object.assign([], this.addModel.arriveConfigList);
|
const list = Object.assign([], this.addModel.arriveConfigList);
|
||||||
let tempTime = this.computedTimeByString(this.addModel.startTime) / 1000;
|
let tempTime = this.computedTimeByString(this.addModel.startTime) / 1000;
|
||||||
const runLevel = this.defaultSpeedLevel || 'l3'; // 默认等级三
|
const runLevel = this.defaultSpeedLevel || 'l1'; // 默认等级三
|
||||||
list.forEach((elem, index) => {
|
list.forEach((elem, index) => {
|
||||||
if (type == 'defaultStopTime' || type == 'routingCode') {
|
// type == 'defaultStopTime' ||
|
||||||
elem.stopTime = parseInt(this.defaultStopTime);
|
if (type == 'routingCode') {
|
||||||
|
// elem.stopTime = parseInt(this.defaultStopTime);
|
||||||
|
if (this.stopTimeMap[elem.stationCode]) {
|
||||||
|
// if (index == 0 || index == list.length - 1) {
|
||||||
|
// elem.stopTime = 0;
|
||||||
|
// } else {
|
||||||
|
elem.stopTime = this.stopTimeMap[elem.stationCode].parkingTime;
|
||||||
|
// }
|
||||||
|
} else {
|
||||||
|
elem.stopTime = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// elem.arriveTime = index ? formatTime(tempTime) : '';
|
||||||
|
if (index) {
|
||||||
|
elem.arriveTime = formatTime(tempTime);
|
||||||
|
} else {
|
||||||
|
const time = tempTime || this.computedTimeByString('23:59:59') / 1000 + 1;
|
||||||
|
elem.arriveTime = formatTime(time - elem.stopTime);
|
||||||
}
|
}
|
||||||
elem.arriveTime = index ? formatTime(tempTime) : '';
|
|
||||||
if (index > 0) {
|
if (index > 0) {
|
||||||
elem.departureTime = index == list.length - 1 ? '' : formatTime(tempTime + elem.stopTime);
|
elem.departureTime = formatTime(tempTime + elem.stopTime);
|
||||||
|
// elem.departureTime = index == list.length - 1 ? '' : formatTime(tempTime + elem.stopTime);
|
||||||
} else {
|
} else {
|
||||||
elem.departureTime = formatTime(tempTime);
|
elem.departureTime = formatTime(tempTime);
|
||||||
}
|
}
|
||||||
const runLevelObj = this.defaultSpeedLevelList.find(speedLevel=>{ return speedLevel.value == runLevel; });
|
const runLevelObj = this.defaultSpeedLevelList.find(speedLevel=>{ return speedLevel.value == runLevel; });
|
||||||
if (!elem.speedLevelTime || type == 'defaultSpeedLevel') {
|
// if (!elem.speedLevelTime || type == 'defaultSpeedLevel') {
|
||||||
const realRunlevel = this.compuntedRunTime(list, index, runLevel);
|
const realRunlevel = this.compuntedRunTime(list, index, runLevel);
|
||||||
elem.speedLevelTime = realRunlevel;
|
elem.speedLevelTime = realRunlevel;
|
||||||
}
|
// }
|
||||||
elem.speedLevel = this.defaultSpeedLevel == 'l3' ? `${this.$t('planMonitor.default')}(${runLevelObj.label})` : runLevelObj.label;
|
// this.defaultSpeedLevel == 'l1' ? `(${runLevelObj.label})` : runLevelObj.label
|
||||||
|
elem.speedLevel = runLevelObj.label;
|
||||||
|
// elem.speedLevelTime = realRunlevel;
|
||||||
if (index > 0) {
|
if (index > 0) {
|
||||||
tempTime = tempTime + elem.stopTime + elem.speedLevelTime;
|
tempTime = tempTime + elem.stopTime + elem.speedLevelTime;
|
||||||
} else {
|
} else {
|
||||||
@ -406,8 +442,8 @@ export default {
|
|||||||
this.$set(this.addModel, 'arriveConfigList', arriveConfigList);
|
this.$set(this.addModel, 'arriveConfigList', arriveConfigList);
|
||||||
this.addModel.startStationCode = row.startStationCode;
|
this.addModel.startStationCode = row.startStationCode;
|
||||||
this.addModel.endStationCode = row.endStationCode;
|
this.addModel.endStationCode = row.endStationCode;
|
||||||
// this.addModel.endSectionCode = row.endSectionCode;
|
this.addModel.endSectionCode = row.endSectionCode;
|
||||||
// this.addModel.startSectionCode = row.startSectionCode;
|
this.addModel.startSectionCode = row.startSectionCode;
|
||||||
this.addModel.routingCode = row.code;
|
this.addModel.routingCode = row.code;
|
||||||
this.computedDetailList('routingCode');
|
this.computedDetailList('routingCode');
|
||||||
},
|
},
|
||||||
|
@ -15,9 +15,9 @@
|
|||||||
<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">{{ $t('planMonitor.commissioningTrain') }}</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') }}
|
{{ $t('planMonitor.task') }}
|
||||||
@ -74,7 +74,7 @@ export default {
|
|||||||
isNew:true,
|
isNew:true,
|
||||||
model: {
|
model: {
|
||||||
serviceNumber: '',
|
serviceNumber: '',
|
||||||
debugTrain: false,
|
// debugTrain: false,
|
||||||
tripConfigList: []
|
tripConfigList: []
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -107,9 +107,9 @@ export default {
|
|||||||
id:index + 1,
|
id:index + 1,
|
||||||
tripNumber: tripNumber,
|
tripNumber: tripNumber,
|
||||||
startStationCode: resp.data.startStationCode,
|
startStationCode: resp.data.startStationCode,
|
||||||
startTime: formatTime(trainInfo.stationTimeList[0].secondTime + 7200),
|
startTime: formatTime(trainInfo.stationTimeList[1].secondTime + 7200),
|
||||||
endStationCode: resp.data.endStationCode,
|
endStationCode: resp.data.endStationCode,
|
||||||
endTime: formatTime(trainInfo.stationTimeList[lastIndex].secondTime + 7200),
|
endTime: formatTime(trainInfo.stationTimeList[lastIndex - 1].secondTime + 7200),
|
||||||
routingCode : resp.data.code,
|
routingCode : resp.data.code,
|
||||||
endSectionCode:resp.data.endSectionCode,
|
endSectionCode:resp.data.endSectionCode,
|
||||||
startSectionCode:resp.data.startSectionCode,
|
startSectionCode:resp.data.startSectionCode,
|
||||||
@ -142,13 +142,14 @@ export default {
|
|||||||
const newModel = {
|
const newModel = {
|
||||||
sectionCode:resp.data.parkSectionCodeList[index].sectionCode,
|
sectionCode:resp.data.parkSectionCodeList[index].sectionCode,
|
||||||
stationCode:newstationTime.stationCode,
|
stationCode:newstationTime.stationCode,
|
||||||
speedLevel:'默认',
|
// speedLevel:'默认',
|
||||||
arriveTime: formatTime(newstationTime.arriveTime + 7200),
|
arriveTime: formatTime(newstationTime.arriveTime + 7200),
|
||||||
departureTime: formatTime(newstationTime.departureTime + 7200),
|
departureTime: formatTime(newstationTime.departureTime + 7200),
|
||||||
stopTime:newstationTime.departureTime - newstationTime.arriveTime
|
stopTime:newstationTime.departureTime - newstationTime.arriveTime
|
||||||
};
|
};
|
||||||
if (index < newstationTimeList.length - 1) {
|
if (index < newstationTimeList.length - 1) {
|
||||||
newModel.speedLevelTime = newstationTimeList[index + 1].arriveTime - newstationTime.departureTime;
|
newModel.speedLevelTime = newstationTimeList[index + 1].arriveTime - newstationTime.departureTime;
|
||||||
|
// newModel.speedLevel=
|
||||||
}
|
}
|
||||||
taskObj.arriveConfigList.push(newModel);
|
taskObj.arriveConfigList.push(newModel);
|
||||||
});
|
});
|
||||||
@ -279,14 +280,18 @@ export default {
|
|||||||
if (this.isNew) {
|
if (this.isNew) {
|
||||||
if (this.model.tripConfigList.length > 0) {
|
if (this.model.tripConfigList.length > 0) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
|
this.model.tripConfigList.map(each=>{
|
||||||
|
each.startTime = each.arriveConfigList[0].arriveTime;
|
||||||
|
each.endTime = each.arriveConfigList[each.arriveConfigList.length - 1].departureTime;
|
||||||
|
});
|
||||||
addPlanService(this.model).then(() => {
|
addPlanService(this.model).then(() => {
|
||||||
this.$emit('refresh');
|
this.$emit('refresh');
|
||||||
// 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.$t('tip.planCreationSuccessful'));
|
this.$message.success(this.$t('tip.planCreationSuccessful'));
|
||||||
}).catch(() => {
|
}).catch((error) => {
|
||||||
this.$messageBox(this.$t('tip.createPlanFailed'));
|
this.$messageBox(this.$t('tip.createPlanFailed') + error.message);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.$messageBox('请增加任务');
|
this.$messageBox('请增加任务');
|
||||||
@ -294,6 +299,10 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
if (this.model.tripConfigList.length > 0) {
|
if (this.model.tripConfigList.length > 0) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
|
this.model.tripConfigList.map(each=>{
|
||||||
|
each.startTime = each.arriveConfigList[0].arriveTime;
|
||||||
|
each.endTime = each.arriveConfigList[each.arriveConfigList.length - 1].departureTime;
|
||||||
|
});
|
||||||
updatePlanService(this.$route.query.planId, this.model.serviceNumber, this.model).then(() => {
|
updatePlanService(this.$route.query.planId, this.model.serviceNumber, this.model).then(() => {
|
||||||
this.$emit('refresh');
|
this.$emit('refresh');
|
||||||
// this.$emit('dispatchOperate', {
|
// this.$emit('dispatchOperate', {
|
||||||
|
@ -24,7 +24,8 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="right" label="所属站台">
|
<el-table-column prop="right" label="所属站台">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span style="margin-left: 10px">{{ formatSelect(scope.row.sectionCode) ?'上行站台':'下行站台' }}</span>
|
<!-- ?'上行站台':'下行站台' -->
|
||||||
|
<span style="margin-left: 10px">{{ formatSelect(scope.row.sectionCode) }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="parkingTime" label="停站时间" width="90">
|
<el-table-column prop="parkingTime" label="停站时间" width="90">
|
||||||
@ -59,7 +60,7 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
title() {
|
title() {
|
||||||
return this.$t('planMonitor.modifying.modifyRunLevel');
|
return this.$t('planMonitor.modifying.modifyStopTime');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@ -71,6 +72,7 @@ export default {
|
|||||||
},
|
},
|
||||||
formatSelect(code) {
|
formatSelect(code) {
|
||||||
const device = this.$store.state.map.map && this.$store.state.map.map.stationStandList.find(ele => ele.standTrackCode == code);
|
const device = this.$store.state.map.map && this.$store.state.map.map.stationStandList.find(ele => ele.standTrackCode == code);
|
||||||
|
console.log(device.right);
|
||||||
if (device) {
|
if (device) {
|
||||||
return device.right ? '上行站台' : '下行站台';
|
return device.right ? '上行站台' : '下行站台';
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,88 @@
|
|||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
>
|
>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="4">
|
<!-- <el-col :span="2">
|
||||||
|
<el-row>
|
||||||
|
<el-col :offset="8" class="lineHeight">
|
||||||
|
<el-checkbox v-model="editModel.trainManual">{{ $t('planMonitor.modifying.manual') }}</el-checkbox>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-col> -->
|
||||||
|
<!-- <el-col :span="6">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="11" :offset="1" class="lineHeight">
|
||||||
|
<span>{{ $t('planMonitor.modifying.defaultStopTime') }}</span>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-input-number v-model="defaultStopTime" placeholder="请输入时间" size="mini" :controls="false" :min="0" /> -->
|
||||||
|
<!-- <el-select
|
||||||
|
v-model="editModel.defaultStopTime"
|
||||||
|
style="display: inline-black"
|
||||||
|
size="mini"
|
||||||
|
:placeholder="$t('planMonitor.modifying.pleaseSelect')"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in defaultStopTimeList"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select> -->
|
||||||
|
<!-- </el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-col> -->
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="9" class="lineHeight">
|
||||||
|
<span>{{ $t('planMonitor.modifying.serviceNumber') }}</span>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="15">
|
||||||
|
<el-input v-model="serviceNumber" size="mini" disabled />
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-col>
|
||||||
|
<!-- <el-col :span="7" class="lineHeight">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="22" :offset="2">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-checkbox v-model="editModel.clearGuest">{{ $t('planMonitor.modifying.clearGuest') }}</el-checkbox>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-checkbox v-model="editModel.continuationPlan">{{ $t('planMonitor.modifying.continuationPlan') }}</el-checkbox>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-checkbox v-model="editModel.firstTrain">{{ $t('planMonitor.modifying.firstTrain') }}</el-checkbox>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-col> -->
|
||||||
|
<el-col :span="6" class="lineHeight">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="10" :offset="1">
|
||||||
|
<span>{{ $t('planMonitor.modifying.defaultRunLevel') }}</span>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-select
|
||||||
|
v-model="defaultSpeedLevel"
|
||||||
|
style="display: inline-black"
|
||||||
|
size="mini"
|
||||||
|
:placeholder="$t('planMonitor.modifying.pleaseSelect')"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in defaultSpeedLevelList"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="6">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="9" class="lineHeight">
|
<el-col :span="9" class="lineHeight">
|
||||||
<span>{{ $t('planMonitor.modifying.tripNumber') }}</span>
|
<span>{{ $t('planMonitor.modifying.tripNumber') }}</span>
|
||||||
@ -29,72 +110,13 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="2">
|
<!-- <el-col :span="6">
|
||||||
<el-row>
|
|
||||||
<el-col :offset="8" class="lineHeight">
|
|
||||||
<el-checkbox v-model="editModel.trainManual">{{ $t('planMonitor.modifying.manual') }}</el-checkbox>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="6">
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="11" :offset="1" class="lineHeight">
|
|
||||||
<span>{{ $t('planMonitor.modifying.defaultStopTime') }}</span>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-input-number v-model="defaultStopTime" placeholder="请输入时间" size="mini" :controls="false" :min="0" />
|
|
||||||
<!-- <el-select
|
|
||||||
v-model="editModel.defaultStopTime"
|
|
||||||
style="display: inline-black"
|
|
||||||
size="mini"
|
|
||||||
:placeholder="$t('planMonitor.modifying.pleaseSelect')"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in defaultStopTimeList"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</el-select> -->
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="5">
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="9" :offset="2" class="lineHeight">
|
|
||||||
<span>{{ $t('planMonitor.modifying.serviceNumber') }}</span>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="13">
|
|
||||||
<el-input v-model="serviceNumber" size="mini" disabled />
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="7" class="lineHeight">
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="22" :offset="2">
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="6">
|
|
||||||
<el-checkbox v-model="editModel.clearGuest">{{ $t('planMonitor.modifying.clearGuest') }}</el-checkbox>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<el-checkbox v-model="editModel.continuationPlan">{{ $t('planMonitor.modifying.continuationPlan') }}</el-checkbox>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="6">
|
|
||||||
<el-checkbox v-model="editModel.firstTrain">{{ $t('planMonitor.modifying.firstTrain') }}</el-checkbox>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="4">
|
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="9" class="lineHeight">
|
<el-col :span="9" class="lineHeight">
|
||||||
<span>{{ $t('planMonitor.modifying.serialNumber') }}</span>
|
<span>{{ $t('planMonitor.modifying.serialNumber') }}</span>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="15">
|
<el-col :span="15">
|
||||||
<el-select v-model="editModel.serialNumber" size="mini" style="display: inline-black" :placeholder="$t('planMonitor.modifying.pleaseSelect')">
|
<el-select v-model="editModel.serialNumber" size="mini" style="display: inline-black" disabled :placeholder="$t('planMonitor.modifying.pleaseSelect')">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in serialNumberList"
|
v-for="item in serialNumberList"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
@ -104,42 +126,20 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
<el-col :span="2">
|
<!-- <el-col :span="2">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :offset="8" class="lineHeight">
|
<el-col :offset="8" class="lineHeight">
|
||||||
<el-checkbox v-model="editModel.serialManual" size="mini">{{ $t('planMonitor.modifying.manual') }}</el-checkbox>
|
<el-checkbox v-model="editModel.serialManual" size="mini">{{ $t('planMonitor.modifying.manual') }}</el-checkbox>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
<el-col :span="6" class="lineHeight">
|
<el-col :span="6" class="lineHeight">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="11" :offset="1">
|
<el-col :span="10" :offset="1">
|
||||||
<span>{{ $t('planMonitor.modifying.defaultRunLevel') }}</span>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-select
|
|
||||||
v-model="editModel.defaultSpeedLevel"
|
|
||||||
style="display: inline-black"
|
|
||||||
size="mini"
|
|
||||||
:placeholder="$t('planMonitor.modifying.pleaseSelect')"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in defaultSpeedLevelList"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="5" class="lineHeight">
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="9" :offset="2">
|
|
||||||
<span>{{ $t('planMonitor.modifying.startTime') }}:</span>
|
<span>{{ $t('planMonitor.modifying.startTime') }}:</span>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="13">
|
<el-col :span="12">
|
||||||
<el-time-picker
|
<el-time-picker
|
||||||
v-model="editModel.startTime"
|
v-model="editModel.startTime"
|
||||||
:placeholder="$t('planMonitor.modifying.selectTime')"
|
:placeholder="$t('planMonitor.modifying.selectTime')"
|
||||||
@ -150,7 +150,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="7" class="lineHeight">
|
<!-- <el-col :span="7" class="lineHeight">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="22" :offset="2">
|
<el-col :span="22" :offset="2">
|
||||||
<el-row>
|
<el-row>
|
||||||
@ -166,7 +166,7 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row style="margin-bottom: 5px;">
|
<el-row style="margin-bottom: 5px;">
|
||||||
{{ $t('planMonitor.modifying.route') }}
|
{{ $t('planMonitor.modifying.route') }}
|
||||||
@ -212,27 +212,37 @@
|
|||||||
{{ formatName(scope.row.sectionCode) }}
|
{{ formatName(scope.row.sectionCode) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="arriveTime" :label="this.$t('planMonitor.arriveTime')" />
|
<el-table-column :label="this.$t('planMonitor.arriveTime')">
|
||||||
<!-- prop="stopTime" -->
|
<template v-if="scope.$index!=0" slot-scope="scope">
|
||||||
<el-table-column :label="this.$t('planMonitor.stopTime')">
|
{{ scope.row.arriveTime }}
|
||||||
<template slot-scope="scope">
|
</template>
|
||||||
<el-input v-model="scope.row.stopTime" placeholder="请输入时间" size="mini" @input="changeStopTime(scope.$index, scope.row.stopTime)" />
|
</el-table-column>
|
||||||
|
<!-- prop="stopTime" -->
|
||||||
|
<el-table-column :label="this.$t('planMonitor.stopTime')">
|
||||||
|
<template v-if="scope.$index!=0&&scope.$index!=editModel.arriveConfigList.length-1" slot-scope="scope">
|
||||||
|
{{ scope.row.stopTime+'s' }}
|
||||||
|
<!-- <el-input v-model="scope.row.stopTime" placeholder="请输入时间" size="mini" @input="changeStopTime(scope.$index, scope.row.stopTime)" /> -->
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column :label="this.$t('planMonitor.departureTime')">
|
||||||
|
<template v-if="scope.$index!=editModel.arriveConfigList.length-1" slot-scope="scope">
|
||||||
|
{{ scope.row.departureTime }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="departureTime" :label="this.$t('planMonitor.departureTime')" />
|
|
||||||
<el-table-column :label="this.$t('planMonitor.runLevel')">
|
<el-table-column :label="this.$t('planMonitor.runLevel')">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.speedLevel }}
|
<span style="font-size:13px;"> {{ scope.row.speedLevel }}</span>
|
||||||
<el-input v-model="scope.row.speedLevelTime" placeholder="请输入运行等级" size="mini" @input="changeSpeedLevelTime(scope.$index, scope.row.speedLevelTime)" />
|
<span>{{ '('+scope.row.speedLevelTime+'s)' }}</span>
|
||||||
|
<!-- <el-input v-model="scope.row.speedLevelTime" placeholder="请输入运行等级" size="mini" @input="changeSpeedLevelTime(scope.$index, scope.row.speedLevelTime)" /> -->
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<!-- <el-row>
|
||||||
<el-col :offset="16">
|
<el-col :offset="16">
|
||||||
<el-checkbox v-model="editModel.default">{{ $t('planMonitor.modifying.showDefaultTime') }}</el-checkbox>
|
<el-checkbox v-model="editModel.default">{{ $t('planMonitor.modifying.showDefaultTime') }}</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">{{ $t('global.cancel') }}</el-button>
|
<el-button size="medium" @click="doClose">{{ $t('global.cancel') }}</el-button>
|
||||||
<el-button type="primary" size="medium" @click="handleCommit">{{ $t('global.confirm') }}</el-button>
|
<el-button type="primary" size="medium" @click="handleCommit">{{ $t('global.confirm') }}</el-button>
|
||||||
@ -240,7 +250,7 @@
|
|||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getRoutingBySDTNumber, updatePlanTrip, getMapStationRun } from '@/api/runplan';
|
import { getRoutingBySDTNumber, updatePlanTrip, getMapStationRunUser, getStationStopTime } from '@/api/runplan';
|
||||||
import { formatTime, formatName } from '@/utils/runPlan';
|
import { formatTime, formatName } from '@/utils/runPlan';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -263,8 +273,9 @@ export default {
|
|||||||
PlanConvert: {},
|
PlanConvert: {},
|
||||||
parkSectionCodeList:[],
|
parkSectionCodeList:[],
|
||||||
stopStationMap: {},
|
stopStationMap: {},
|
||||||
defaultStopTime: 0,
|
stopTimeMap:{},
|
||||||
defaultSpeedLevel: 'l3',
|
// defaultStopTime: 0,
|
||||||
|
defaultSpeedLevel: 'l1',
|
||||||
routingList: [],
|
routingList: [],
|
||||||
tripNumber: '',
|
tripNumber: '',
|
||||||
serviceNumber: '',
|
serviceNumber: '',
|
||||||
@ -289,7 +300,7 @@ export default {
|
|||||||
tripNumberList: [{ value: '', label: this.$t('planMonitor.modifying.automatic') }],
|
tripNumberList: [{ value: '', label: this.$t('planMonitor.modifying.automatic') }],
|
||||||
// defaultStopTimeList: [{ value: '', label: this.$t('planMonitor.modifying.default') }],
|
// defaultStopTimeList: [{ value: '', label: this.$t('planMonitor.modifying.default') }],
|
||||||
// defaultSpeedLevelList: [{ value: '', label: this.$t('planMonitor.modifying.default') }],
|
// defaultSpeedLevelList: [{ value: '', label: this.$t('planMonitor.modifying.default') }],
|
||||||
serialNumberList: [],
|
// serialNumberList: [],
|
||||||
defaultSpeedLevelList: [
|
defaultSpeedLevelList: [
|
||||||
{ value: 'l1', label: '等级一' },
|
{ value: 'l1', label: '等级一' },
|
||||||
{ value: 'l2', label: '等级二' },
|
{ value: 'l2', label: '等级二' },
|
||||||
@ -308,9 +319,9 @@ export default {
|
|||||||
'editModel.startTime': function () {
|
'editModel.startTime': function () {
|
||||||
this.computedDetailList();
|
this.computedDetailList();
|
||||||
},
|
},
|
||||||
'defaultStopTime': function () {
|
// 'defaultStopTime': function () {
|
||||||
this.computedDetailList('defaultStopTime');
|
// this.computedDetailList('defaultStopTime');
|
||||||
},
|
// },
|
||||||
'defaultSpeedLevel': function () {
|
'defaultSpeedLevel': function () {
|
||||||
this.computedDetailList('defaultSpeedLevel');
|
this.computedDetailList('defaultSpeedLevel');
|
||||||
}
|
}
|
||||||
@ -334,35 +345,50 @@ export default {
|
|||||||
if (stopStationObj) {
|
if (stopStationObj) {
|
||||||
if (stopStationObj.runPlanLevelVO) {
|
if (stopStationObj.runPlanLevelVO) {
|
||||||
runTime = parseInt(stopStationObj.runPlanLevelVO[runLevel]);
|
runTime = parseInt(stopStationObj.runPlanLevelVO[runLevel]);
|
||||||
} else if (stopStationObj['l3']) {
|
} else if (stopStationObj[runLevel]) {
|
||||||
runTime = parseInt(stopStationObj['l3']);
|
runTime = parseInt(stopStationObj[runLevel]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return runTime;
|
return runTime;
|
||||||
},
|
},
|
||||||
computedDetailList(type = null) {
|
computedDetailList(type = null) {
|
||||||
if (this.editModel.routingCode) {
|
if (this.editModel.routingCode) {
|
||||||
const list = Object.assign([], this.editModel.arriveConfigList);
|
const list = Object.assign([], this.editModel.arriveConfigList);
|
||||||
let tempTime = this.computedTimeByString(this.editModel.startTime) / 1000;
|
let tempTime = this.computedTimeByString(this.editModel.startTime) / 1000;
|
||||||
const runLevel = this.defaultSpeedLevel || 'l3'; // 默认等级三
|
const runLevel = this.defaultSpeedLevel || 'l1'; // 默认等级三
|
||||||
list.forEach((elem, index) => {
|
list.forEach((elem, index) => {
|
||||||
if (type == 'defaultStopTime' || type == 'routingCode') {
|
// type == 'defaultStopTime' ||
|
||||||
elem.stopTime = parseInt(this.defaultStopTime);
|
if (type == 'routingCode') {
|
||||||
|
// elem.stopTime = parseInt(this.defaultStopTime);
|
||||||
|
if (this.stopTimeMap[elem.stationCode]) {
|
||||||
|
elem.stopTime = this.stopTimeMap[elem.stationCode].parkingTime;
|
||||||
|
} else {
|
||||||
|
elem.stopTime = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// elem.arriveTime = index ? formatTime(tempTime) : '';
|
||||||
|
if (index) {
|
||||||
|
elem.arriveTime = formatTime(tempTime);
|
||||||
|
} else {
|
||||||
|
const time = tempTime || this.computedTimeByString('23:59:59') / 1000 + 1;
|
||||||
|
elem.arriveTime = formatTime(time - elem.stopTime);
|
||||||
}
|
}
|
||||||
elem.arriveTime = index ? formatTime(tempTime) : '';
|
|
||||||
if (index > 0) {
|
if (index > 0) {
|
||||||
elem.departureTime = index == list.length - 1 ? '' : formatTime(tempTime + elem.stopTime);
|
// elem.departureTime = index == list.length - 1 ? '' : formatTime(tempTime + elem.stopTime);
|
||||||
|
elem.departureTime = formatTime(tempTime + elem.stopTime);
|
||||||
} else {
|
} else {
|
||||||
elem.departureTime = formatTime(tempTime);
|
elem.departureTime = formatTime(tempTime);
|
||||||
}
|
}
|
||||||
const runLevelObj = this.defaultSpeedLevelList.find(speedLevel=>{ return speedLevel.value == runLevel; });
|
const runLevelObj = this.defaultSpeedLevelList.find(speedLevel=>{ return speedLevel.value == runLevel; });
|
||||||
if (!elem.speedLevelTime || type == 'defaultSpeedLevel') {
|
// if (!elem.speedLevelTime || type == 'defaultSpeedLevel') {
|
||||||
const realRunlevel = this.compuntedRunTime(list, index, runLevel);
|
const realRunlevel = this.compuntedRunTime(list, index, runLevel);
|
||||||
elem.speedLevelTime = realRunlevel;
|
elem.speedLevelTime = realRunlevel;
|
||||||
}
|
// }
|
||||||
elem.speedLevel = this.defaultSpeedLevel == 'l3' ? `${this.$t('planMonitor.default')}(${runLevelObj.label})` : runLevelObj.label;
|
// this.defaultSpeedLevel == 'l1' ? `(${runLevelObj.label})` : runLevelObj.label
|
||||||
|
elem.speedLevel = runLevelObj.label;
|
||||||
|
// elem.speedLevelTime = realRunlevel;
|
||||||
|
|
||||||
if (index > 0) {
|
if (index > 0) {
|
||||||
tempTime = tempTime + elem.stopTime + elem.speedLevelTime;
|
tempTime = tempTime + elem.stopTime + elem.speedLevelTime;
|
||||||
} else {
|
} else {
|
||||||
@ -382,34 +408,46 @@ export default {
|
|||||||
this.planId = this.$route.query.planId;
|
this.planId = this.$route.query.planId;
|
||||||
this.PlanConvert = this.$theme.loadPlanConvert(lineCode);
|
this.PlanConvert = this.$theme.loadPlanConvert(lineCode);
|
||||||
if (mapId) {
|
if (mapId) {
|
||||||
getMapStationRun(mapId).then(resp => {
|
getMapStationRunUser(mapId).then(resp => {
|
||||||
const list = resp.data;
|
const list = resp.data.list;
|
||||||
list.forEach(elem => {
|
list.forEach(elem => {
|
||||||
this.stopStationMap[[elem.startSectionCode, elem.endSectionCode].toString()] = elem;
|
this.stopStationMap[[elem.startSectionCode, elem.endSectionCode].toString()] = elem;
|
||||||
});
|
});
|
||||||
|
getStationStopTime(mapId).then(response=>{
|
||||||
|
const stopTimeList = response.data.list;
|
||||||
|
stopTimeList.forEach(element=>{
|
||||||
|
this.stopTimeMap[element.stationCode] = {parkingTime:element.parkingTime};
|
||||||
|
});
|
||||||
|
this.initTaskData(params);
|
||||||
|
|
||||||
|
this.dialogShow = true;
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
// this.routingList
|
},
|
||||||
|
initTaskData(params) {
|
||||||
if (params.rowData && params.rowData.arriveConfigList.length > 0) {
|
if (params.rowData && params.rowData.arriveConfigList.length > 0) {
|
||||||
this.editModel.arriveConfigList = params.rowData.arriveConfigList;
|
const paramData = params.rowData;
|
||||||
this.editModel.routingCode = params.rowData.routingCode;
|
this.initRunlevel(paramData);
|
||||||
this.editModel.startStationCode = params.rowData.startStationCode;
|
// const runLevelObj = this.defaultSpeedLevelList.find(speedLevel=>{ return speedLevel.label == ; });
|
||||||
this.editModel.endStationCode = params.rowData.endStationCode;
|
this.editModel.arriveConfigList = paramData.arriveConfigList;
|
||||||
this.editModel.startTime = params.rowData.startTime;
|
this.editModel.routingCode = paramData.routingCode;
|
||||||
this.editModel.endTime = params.rowData.endTime;
|
this.editModel.startStationCode = paramData.startStationCode;
|
||||||
this.editModel.endSectionCode = params.rowData.endSectionCode;
|
this.editModel.endStationCode = paramData.endStationCode;
|
||||||
this.editModel.startSectionCode = params.rowData.startSectionCode;
|
this.editModel.startTime = paramData.startTime;
|
||||||
this.editModel.id = params.rowData.id;
|
this.editModel.endTime = paramData.endTime;
|
||||||
|
this.editModel.endSectionCode = paramData.endSectionCode;
|
||||||
|
this.editModel.startSectionCode = paramData.startSectionCode;
|
||||||
|
this.editModel.id = paramData.id;
|
||||||
this.routingList = [];
|
this.routingList = [];
|
||||||
this.routingList.push({
|
this.routingList.push({
|
||||||
code:params.rowData.routingCode,
|
code:paramData.routingCode,
|
||||||
startStationCode:params.rowData.startStationCode,
|
startStationCode:paramData.startStationCode,
|
||||||
endStationCode:params.rowData.endStationCode,
|
endStationCode:paramData.endStationCode,
|
||||||
endSectionCode:params.rowData.endSectionCode,
|
endSectionCode:paramData.endSectionCode,
|
||||||
startSectionCode:params.rowData.startSectionCode
|
startSectionCode:paramData.startSectionCode
|
||||||
});
|
});
|
||||||
this.computedDetailList();
|
this.computedDetailList();
|
||||||
this.dialogShow = true;
|
|
||||||
} else {
|
} else {
|
||||||
const model = {
|
const model = {
|
||||||
planId: this.$route.query.planId || this.loadRunPlanId,
|
planId: this.$route.query.planId || this.loadRunPlanId,
|
||||||
@ -467,7 +505,7 @@ export default {
|
|||||||
const newModel = {
|
const newModel = {
|
||||||
sectionCode:resp.data.parkSectionCodeList[index].sectionCode,
|
sectionCode:resp.data.parkSectionCodeList[index].sectionCode,
|
||||||
stationCode:newstationTime.stationCode,
|
stationCode:newstationTime.stationCode,
|
||||||
speedLevel:'默认',
|
// speedLevel:'默认',
|
||||||
arriveTime: formatTime(newstationTime.arriveTime + 7200),
|
arriveTime: formatTime(newstationTime.arriveTime + 7200),
|
||||||
departureTime: formatTime(newstationTime.departureTime + 7200),
|
departureTime: formatTime(newstationTime.departureTime + 7200),
|
||||||
stopTime:newstationTime.departureTime - newstationTime.arriveTime
|
stopTime:newstationTime.departureTime - newstationTime.arriveTime
|
||||||
@ -477,58 +515,88 @@ export default {
|
|||||||
}
|
}
|
||||||
this.editModel.arriveConfigList.push(newModel);
|
this.editModel.arriveConfigList.push(newModel);
|
||||||
});
|
});
|
||||||
|
this.initRunlevel(this.editModel);
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.computedDetailList();
|
this.computedDetailList();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
changeStopTime(indexs, time) {
|
initRunlevel(paramData) {
|
||||||
let tempTime = this.computedTimeByString(this.editModel.startTime) / 1000;
|
const speedLevelData = this.stopStationMap[[paramData.arriveConfigList[0].sectionCode, paramData.arriveConfigList[1].sectionCode].toString()];
|
||||||
// const runLevel = this.defaultSpeedLevel || 'l3'; // 默认等级三
|
switch (paramData.arriveConfigList[0].speedLevelTime) {
|
||||||
const arriveConfigList = Object.assign([], this.editModel.arriveConfigList);
|
case speedLevelData.l1: {
|
||||||
arriveConfigList.forEach((elem, index) => {
|
this.defaultSpeedLevel = 'l1';
|
||||||
if (index == indexs) { elem.stopTime = time ? Number(time) : 0; }
|
break;
|
||||||
elem.arriveTime = index ? formatTime(tempTime) : '';
|
}
|
||||||
// const runLevelObj = this.defaultSpeedLevelList.find(speedLevel=>{ return speedLevel.value == runLevel; });
|
case speedLevelData.l2: {
|
||||||
// elem.speedLevel = this.defaultSpeedLevel == 'l3' ? `${this.$t('planMonitor.default')}(${runLevelObj.label})` : runLevelObj.label;
|
this.defaultSpeedLevel = 'l2';
|
||||||
if (index > 0) {
|
break;
|
||||||
elem.departureTime = index == arriveConfigList.length - 1 ? '' : formatTime(tempTime + elem.stopTime);
|
}
|
||||||
} else {
|
case speedLevelData.l3: {
|
||||||
elem.departureTime = formatTime(tempTime);
|
this.defaultSpeedLevel = 'l3';
|
||||||
}
|
break;
|
||||||
const realRunlevel = elem.speedLevelTime;
|
}
|
||||||
if (index > 0) {
|
case speedLevelData.l4: {
|
||||||
tempTime = tempTime + elem.stopTime + realRunlevel;
|
this.defaultSpeedLevel = 'l4';
|
||||||
} else {
|
break;
|
||||||
tempTime = tempTime + realRunlevel;
|
}
|
||||||
}
|
case speedLevelData.l5: {
|
||||||
});
|
this.defaultSpeedLevel = 'l5';
|
||||||
this.editModel.arriveConfigList = arriveConfigList;
|
break;
|
||||||
this.editModel.endTime = formatTime(tempTime - this.editModel.arriveConfigList[this.editModel.arriveConfigList.length - 1].stopTime);
|
}
|
||||||
},
|
default: {
|
||||||
changeSpeedLevelTime(indexs, speedLevelTime) {
|
this.defaultSpeedLevel = 'l1';
|
||||||
const arriveConfigList = Object.assign([], this.editModel.arriveConfigList);
|
break;
|
||||||
let tempTime = this.computedTimeByString(this.editModel.startTime) / 1000;
|
}
|
||||||
arriveConfigList.forEach((elem, index) => {
|
}
|
||||||
elem.arriveTime = index ? formatTime(tempTime) : '';
|
|
||||||
if (index == indexs) { elem.speedLevelTime = speedLevelTime ? Number(speedLevelTime) : 0; }
|
|
||||||
elem.arriveTime = index ? formatTime(tempTime) : '';
|
|
||||||
if (index > 0) {
|
|
||||||
elem.departureTime = index == arriveConfigList.length - 1 ? '' : formatTime(tempTime + elem.stopTime);
|
|
||||||
} else {
|
|
||||||
elem.departureTime = formatTime(tempTime);
|
|
||||||
}
|
|
||||||
const realRunlevel = elem.speedLevelTime;
|
|
||||||
if (index > 0) {
|
|
||||||
tempTime = tempTime + elem.stopTime + realRunlevel;
|
|
||||||
} else {
|
|
||||||
tempTime = tempTime + realRunlevel;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
this.editModel.arriveConfigList = arriveConfigList;
|
|
||||||
this.editModel.endTime = formatTime(tempTime - this.editModel.arriveConfigList[this.editModel.arriveConfigList.length - 1].stopTime);
|
|
||||||
},
|
},
|
||||||
|
// changeStopTime(indexs, time) {
|
||||||
|
// let tempTime = this.computedTimeByString(this.editModel.startTime) / 1000;
|
||||||
|
// // const runLevel = this.defaultSpeedLevel || 'l3'; // 默认等级三
|
||||||
|
// const arriveConfigList = Object.assign([], this.editModel.arriveConfigList);
|
||||||
|
// arriveConfigList.forEach((elem, index) => {
|
||||||
|
// if (index == indexs) { elem.stopTime = time ? Number(time) : 0; }
|
||||||
|
// elem.arriveTime = index ? formatTime(tempTime) : '';
|
||||||
|
// // const runLevelObj = this.defaultSpeedLevelList.find(speedLevel=>{ return speedLevel.value == runLevel; });
|
||||||
|
// // elem.speedLevel = this.defaultSpeedLevel == 'l3' ? `${this.$t('planMonitor.default')}(${runLevelObj.label})` : runLevelObj.label;
|
||||||
|
// if (index > 0) {
|
||||||
|
// elem.departureTime = index == arriveConfigList.length - 1 ? '' : formatTime(tempTime + elem.stopTime);
|
||||||
|
// } else {
|
||||||
|
// elem.departureTime = formatTime(tempTime);
|
||||||
|
// }
|
||||||
|
// const realRunlevel = elem.speedLevelTime;
|
||||||
|
// if (index > 0) {
|
||||||
|
// tempTime = tempTime + elem.stopTime + realRunlevel;
|
||||||
|
// } else {
|
||||||
|
// tempTime = tempTime + realRunlevel;
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// this.editModel.arriveConfigList = arriveConfigList;
|
||||||
|
// this.editModel.endTime = formatTime(tempTime - this.editModel.arriveConfigList[this.editModel.arriveConfigList.length - 1].stopTime);
|
||||||
|
// },
|
||||||
|
// changeSpeedLevelTime(indexs, speedLevelTime) {
|
||||||
|
// const arriveConfigList = Object.assign([], this.editModel.arriveConfigList);
|
||||||
|
// let tempTime = this.computedTimeByString(this.editModel.startTime) / 1000;
|
||||||
|
// arriveConfigList.forEach((elem, index) => {
|
||||||
|
// elem.arriveTime = index ? formatTime(tempTime) : '';
|
||||||
|
// if (index == indexs) { elem.speedLevelTime = speedLevelTime ? Number(speedLevelTime) : 0; }
|
||||||
|
// elem.arriveTime = index ? formatTime(tempTime) : '';
|
||||||
|
// if (index > 0) {
|
||||||
|
// elem.departureTime = index == arriveConfigList.length - 1 ? '' : formatTime(tempTime + elem.stopTime);
|
||||||
|
// } else {
|
||||||
|
// elem.departureTime = formatTime(tempTime);
|
||||||
|
// }
|
||||||
|
// const realRunlevel = elem.speedLevelTime;
|
||||||
|
// if (index > 0) {
|
||||||
|
// tempTime = tempTime + elem.stopTime + realRunlevel;
|
||||||
|
// } else {
|
||||||
|
// tempTime = tempTime + realRunlevel;
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// this.editModel.arriveConfigList = arriveConfigList;
|
||||||
|
// this.editModel.endTime = formatTime(tempTime - this.editModel.arriveConfigList[this.editModel.arriveConfigList.length - 1].stopTime);
|
||||||
|
// },
|
||||||
doShow(params) {
|
doShow(params) {
|
||||||
this.loadInitData(params);
|
this.loadInitData(params);
|
||||||
},
|
},
|
||||||
@ -541,8 +609,10 @@ export default {
|
|||||||
planId: this.$route.query.planId || this.loadRunPlanId,
|
planId: this.$route.query.planId || this.loadRunPlanId,
|
||||||
routingCode: this.editModel.routingCode,
|
routingCode: this.editModel.routingCode,
|
||||||
tripNumber: this.tripNumber,
|
tripNumber: this.tripNumber,
|
||||||
startTime: this.editModel.startTime,
|
// startTime: this.editModel.startTime,
|
||||||
endTime: this.editModel.endTime,
|
startTime:this.editModel.arriveConfigList[0].arriveTime,
|
||||||
|
// endTime: this.editModel.endTime,
|
||||||
|
endTime: this.editModel.arriveConfigList[this.editModel.arriveConfigList.length - 1].departureTime,
|
||||||
arriveConfigList: this.editModel.arriveConfigList,
|
arriveConfigList: this.editModel.arriveConfigList,
|
||||||
SDTNumber: `${this.serviceNumber}${this.tripNumber}`
|
SDTNumber: `${this.serviceNumber}${this.tripNumber}`
|
||||||
};
|
};
|
||||||
|
@ -1,180 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog title="交路配置" :visible.sync="dialogShow" custom-class="content-route" width="100%" :fullscreen="true" top="0px" :before-close="close" :z-index="2000" :append-to-body="true">
|
<el-dialog :title="title" :visible.sync="dialogShow" custom-class="content-route" width="100%" :fullscreen="true" top="0px" :before-close="close" :z-index="2000" :append-to-body="true">
|
||||||
<div class="content-box">
|
<div class="content-box">
|
||||||
<jlmap-visual ref="jlmapVisual" @onMenu="onContextmenu" @onSelect="clickEvent" />
|
<jlmap-visual ref="jlmapVisual" @onMenu="onContextmenu" @onSelect="clickEvent" />
|
||||||
<div style="width: 29%;float: right;" :style="{height: $store.state.app.height-54+'px' }">
|
<!-- :style="{height: $store.state.app.height-54+'px' }" -->
|
||||||
<el-scrollbar wrap-class="scrollbar-wrapper">
|
<div class="routeMap">
|
||||||
<div class="clearfix" style="padding-right: 20px;">
|
<route-config v-if="type=='routeMap'" ref="routeConfig" />
|
||||||
<el-button type="text" class="mapEdit_box" @click="previewRouteEvent">{{ $t('map.preview') }}</el-button>
|
<runplan-config v-if="type=='runplanParams'" ref="runPlanConfig" />
|
||||||
<el-button type="text" class="mapEdit_box" @click="createRouteEvent">{{ $t('map.newConstruction') }}</el-button>
|
|
||||||
</div>
|
|
||||||
<el-form ref="form" :model="addModel" :rules="rules" label-width="120px" size="mini">
|
|
||||||
<div class="definition">
|
|
||||||
<el-form-item :label="$t('map.routingName')" prop="name">
|
|
||||||
<el-input v-model="addModel.name" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item :label="$t('map.startStationCodeColon')" prop="startStationCode">
|
|
||||||
<el-select v-model="addModel.startStationCode" clearable :filterable="true" @change="changeStartStation">
|
|
||||||
<el-option
|
|
||||||
v-for="item in filterStationList"
|
|
||||||
:key="item.code"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.code"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
<el-button
|
|
||||||
:type=" field === 'startStationCode' ? 'danger' : 'primary'"
|
|
||||||
@click="hover('startStationCode')"
|
|
||||||
>{{ $t('map.activate') }}</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item :label="$t('map.startSectionColon')" prop="startSectionCode">
|
|
||||||
<el-select v-model="addModel.startSectionCode" clearable :filterable="true" :disabled="editShow" @change="changeStartSection">
|
|
||||||
<el-option
|
|
||||||
v-for="item in filterSectionList"
|
|
||||||
:key="item.code"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.code"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
<el-button
|
|
||||||
:disabled="editShow"
|
|
||||||
:type=" field === 'startSectionCode' ? 'danger' : 'primary'"
|
|
||||||
@click="hover('startSectionCode')"
|
|
||||||
>{{ $t('map.activate') }}</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item :label="$t('map.endStationColon')" prop="endStationCode">
|
|
||||||
<el-select v-model="addModel.endStationCode" clearable :filterable="true" :disabled="!isStartSelected" @change="changeEndStation">
|
|
||||||
<el-option
|
|
||||||
v-for="item in filterStationList"
|
|
||||||
:key="item.code"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.code"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
<el-button
|
|
||||||
:disabled="!isStartSelected"
|
|
||||||
:type=" field === 'endStationCode' ? 'danger' : 'primary'"
|
|
||||||
@click="hover('endStationCode')"
|
|
||||||
>{{ $t('map.activate') }}</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item :label="$t('map.endSectionColon')" prop="endSectionCode">
|
|
||||||
<el-select v-model="addModel.endSectionCode" clearable :filterable="true" :disabled="editShow || !isStartSelected" @change="changeEndSection">
|
|
||||||
<el-option
|
|
||||||
v-for="item in filterSectionList"
|
|
||||||
:key="item.code"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.code"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
<el-button
|
|
||||||
:disabled="editShow || !isStartSelected"
|
|
||||||
:type=" field === 'endSectionCode' ? 'danger' : 'primary'"
|
|
||||||
@click="hover('endSectionCode')"
|
|
||||||
>{{ $t('map.activate') }}</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item :label="$t('map.destinationCode')" prop="destinationCode" :disabled="editShow">
|
|
||||||
<el-input v-model="addModel.destinationCode" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item :label="$t('map.routingDirection')" prop="directionCode">
|
|
||||||
<el-select v-model="addModel.right" clearable :filterable="true" :placeholder="$t('map.pleaseSelect')">
|
|
||||||
<el-option
|
|
||||||
v-for="item in DirectionCodeList"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<!-- <el-form-item v-if="!editShow" label="是否生成回路" prop="withLoop">
|
|
||||||
<el-checkbox v-model="addModel.withLoop" />
|
|
||||||
</el-form-item> -->
|
|
||||||
<el-form-item :label="$t('map.remarksColon')" prop="remarks">
|
|
||||||
<el-input v-model="addModel.remarks" type="textarea" :rows="4" :placeholder="$t('map.pleaseSelect')" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item :label="$t('map.trafficSegmentData')" prop="parkSectionCodeList">
|
|
||||||
<el-table
|
|
||||||
:data="addModel.parkSectionCodeList"
|
|
||||||
border
|
|
||||||
style="width: 97%"
|
|
||||||
class="el-parkSectionCode-table"
|
|
||||||
>
|
|
||||||
<el-table-column prop="sectionCode" :label="$t('map.stationName')">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<span>{{ formatName(scope.row.stationCode) }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="sectionCode" :label="$t('map.sectionName')">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<span>{{ formatName(scope.row.sectionCode) }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column :label="$t('map.operation')" width="50">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-button
|
|
||||||
v-show="scope.$index!=0&&scope.$index!=addModel.parkSectionCodeList.length-1"
|
|
||||||
type="text"
|
|
||||||
size="small"
|
|
||||||
@click.native.prevent="deleteSection(addModel.parkSectionCodeList, scope.$index)"
|
|
||||||
>
|
|
||||||
{{ $t('map.remove') }}
|
|
||||||
</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
<div style="margin-top:10px;">
|
|
||||||
<span>车站:</span>
|
|
||||||
<el-select v-model="stationCode" clearable :filterable="true" :placeholder="$t('map.pleaseSelect')">
|
|
||||||
<el-option
|
|
||||||
v-for="item in filterStationList"
|
|
||||||
:key="item.code"
|
|
||||||
:label="`${item.name}(${item.code})`"
|
|
||||||
:value="item.code"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
<el-button
|
|
||||||
:disabled="!allowSelect"
|
|
||||||
:type="field === 'routingStation' ? 'danger' : 'primary'"
|
|
||||||
@click="hover('routingStation')"
|
|
||||||
>{{ $t('map.activate') }}</el-button>
|
|
||||||
</div>
|
|
||||||
<div style="margin-top:10px;">
|
|
||||||
<span>区段:</span>
|
|
||||||
<el-select v-model="sectionCode" clearable :filterable="true" :placeholder="$t('map.pleaseSelect')">
|
|
||||||
<el-option
|
|
||||||
v-for="item in sectionList"
|
|
||||||
:key="item.code"
|
|
||||||
:label="`${item.name}(${item.code})`"
|
|
||||||
:value="item.code"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
<el-button
|
|
||||||
:type=" field === 'routingSection' ? 'danger' : 'primary'"
|
|
||||||
:disabled="!allowSelect"
|
|
||||||
@click="hover('routingSection')"
|
|
||||||
>{{ $t('map.activate') }}</el-button>
|
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
:disabled="!allowSelect"
|
|
||||||
@click="pushSection({stationCode: stationCode, sectionCode: sectionCode},'center')"
|
|
||||||
>
|
|
||||||
{{ $t('map.add') }}
|
|
||||||
</el-button>
|
|
||||||
</div>
|
|
||||||
</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') }}
|
|
||||||
</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>
|
|
||||||
</div>
|
|
||||||
</el-form>
|
|
||||||
</el-scrollbar>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<route-operate ref="routeOperate" @routingSelected="routingSelected" />
|
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -182,150 +15,54 @@
|
|||||||
import JlmapVisual from '@/views/newMap/jlmapNew/index';
|
import JlmapVisual from '@/views/newMap/jlmapNew/index';
|
||||||
import { loadMapDataById } from '@/utils/loaddata';
|
import { loadMapDataById } from '@/utils/loaddata';
|
||||||
import { EventBus } from '@/scripts/event-bus';
|
import { EventBus } from '@/scripts/event-bus';
|
||||||
|
import RouteConfig from './routeConfig';
|
||||||
import RouteOperate from './routeOperate';
|
import RunplanConfig from './runplanConfig';
|
||||||
|
|
||||||
import { mapGetters } from 'vuex';
|
|
||||||
import { setUID } from '@/jmapNew/utils/Uid';
|
|
||||||
import { addRoutingData, updateRoutingData } from '@/api/jmap/mapdraft';
|
|
||||||
import { formatName } from '@/utils/runPlan';
|
|
||||||
import Sortable from 'sortablejs';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'RouteMap',
|
name: 'RouteMap',
|
||||||
components: {
|
components: {
|
||||||
JlmapVisual,
|
JlmapVisual,
|
||||||
RouteOperate
|
RouteConfig,
|
||||||
|
RunplanConfig
|
||||||
},
|
},
|
||||||
props:{
|
props:{
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
type:'',
|
||||||
|
title:'',
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
oldDevice: null,
|
oldDevice: null,
|
||||||
field: '',
|
|
||||||
allowSelect:false,
|
|
||||||
isStartSelected:false,
|
|
||||||
stationCode: '',
|
|
||||||
sectionCode: '',
|
|
||||||
isSave: true,
|
|
||||||
loading: false,
|
|
||||||
oldsection:[],
|
oldsection:[],
|
||||||
DirectionCodeList: [{label: '右行', value: true}, {label: '左行', value: false}],
|
isFirst:true
|
||||||
addModel: {
|
|
||||||
name: '',
|
|
||||||
mapId: '',
|
|
||||||
code: '',
|
|
||||||
// withLoop:false,
|
|
||||||
right: true,
|
|
||||||
destinationCode: '',
|
|
||||||
startStationCode: '',
|
|
||||||
startSectionCode: '',
|
|
||||||
endStationCode: '',
|
|
||||||
endSectionCode: '',
|
|
||||||
remarks: '',
|
|
||||||
userId: '',
|
|
||||||
parkSectionCodeList: []
|
|
||||||
},
|
|
||||||
editShow: false,
|
|
||||||
rules: {
|
|
||||||
name: [
|
|
||||||
{ required: true, message: '请输入交路名称', trigger: 'change' }
|
|
||||||
],
|
|
||||||
startStationCode: [
|
|
||||||
{ required: true, message: '请选择起始站', trigger: 'change' }
|
|
||||||
],
|
|
||||||
startSectionCode: [
|
|
||||||
{ required: true, message: '请选择起始区段', trigger: 'change' }
|
|
||||||
],
|
|
||||||
endStationCode: [
|
|
||||||
{ required: true, message: '请选择终到站', trigger: 'change' }
|
|
||||||
],
|
|
||||||
endSectionCode: [
|
|
||||||
{ required: true, message: '请选择终到区段', trigger: 'change' }
|
|
||||||
]
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
|
||||||
...mapGetters('map', [
|
|
||||||
'sectionList',
|
|
||||||
'stationList'
|
|
||||||
]),
|
|
||||||
filterSectionList() {
|
|
||||||
if (this.sectionList) {
|
|
||||||
return this.sectionList.filter(elem => { return elem.standTrack || elem.reentryTrack || elem.transferTrack; });
|
|
||||||
} else {
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
},
|
|
||||||
filterStationList() {
|
|
||||||
if (this.stationList) {
|
|
||||||
return this.stationList.filter(elem => { return true; });
|
|
||||||
} else {
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
},
|
|
||||||
routeName: {
|
|
||||||
get() {
|
|
||||||
var name = '';
|
|
||||||
if (this.isSave) {
|
|
||||||
let begStation = ''; let endStation = '';
|
|
||||||
let begSection = ''; let endSection = '';
|
|
||||||
if (this.stationList) {
|
|
||||||
this.stationList.forEach(elem => {
|
|
||||||
if (elem.code === this.addModel.startStationCode) begStation = elem.name;
|
|
||||||
if (elem.code === this.addModel.endStationCode) endStation = elem.name;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
if (this.sectionList) {
|
|
||||||
this.sectionList.forEach(elem => {
|
|
||||||
if (elem.code === this.addModel.startSectionCode) begSection = '(' + elem.name + ')';
|
|
||||||
if (elem.code === this.addModel.endSectionCode) endSection = '(' + elem.name + ')';
|
|
||||||
});
|
|
||||||
}
|
|
||||||
name = begStation + begSection + '-' + endStation + endSection;
|
|
||||||
}
|
|
||||||
return name;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
|
||||||
watch: {
|
watch: {
|
||||||
mapInfo(val) {
|
|
||||||
if (val) {
|
|
||||||
this.addModel.mapId = val.id;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
'addModel.parkSectionCodeList':function(val, old) {
|
|
||||||
this.changeSectionSelected(val, true);
|
|
||||||
},
|
|
||||||
'$store.state.app.width': function(val) {
|
'$store.state.app.width': function(val) {
|
||||||
this.setWindowSize();
|
this.setWindowSize();
|
||||||
},
|
},
|
||||||
routeName(val, old) {
|
'$store.state.app.windowSizeCount': function() {
|
||||||
if (val) {
|
this.setWindowSize();
|
||||||
this.addModel.name = val;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
sectionCode(val) {
|
|
||||||
val && this.changeBelongSection(val);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.rowDrop();
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async doShow() {
|
async doShow(type) {
|
||||||
|
this.type = type;
|
||||||
|
if (this.type == 'routeMap') {
|
||||||
|
this.title = '交路配置';
|
||||||
|
} else if (this.type == 'runplanParams') {
|
||||||
|
this.title = '参数配置';
|
||||||
|
|
||||||
|
}
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
await this.setWindowSize();
|
await this.setWindowSize();
|
||||||
await this.loadInitPage();
|
if (this.isFirst) {
|
||||||
},
|
await this.loadInitPage();
|
||||||
previewRouteEvent() {
|
}
|
||||||
this.$refs.routeOperate.doShow();
|
this.isFirst = false;
|
||||||
},
|
if (this.type == 'runplanParams') { this.$refs.runPlanConfig.doShow(); }
|
||||||
createRouteEvent() {
|
|
||||||
this.clear();
|
|
||||||
},
|
},
|
||||||
// 获取设备数据
|
// 获取设备数据
|
||||||
getDeviceByEm(em) {
|
getDeviceByEm(em) {
|
||||||
@ -384,331 +121,22 @@ export default {
|
|||||||
EventBus.$emit('viewLoading', false);
|
EventBus.$emit('viewLoading', false);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
routingSelected(data) {
|
|
||||||
this.editData(data);
|
|
||||||
},
|
|
||||||
// 行拖拽
|
|
||||||
rowDrop() {
|
|
||||||
const that = this;
|
|
||||||
const tbody = document.querySelector('.el-parkSectionCode-table tbody', {filter:'.ignoreDrag'});
|
|
||||||
if (tbody) {
|
|
||||||
Sortable.create(tbody, {
|
|
||||||
onEnd({ newIndex, oldIndex }) {
|
|
||||||
const length = that.addModel.parkSectionCodeList.length - 1;
|
|
||||||
if (newIndex != 0 && oldIndex != 0 && newIndex != length && oldIndex != length) {
|
|
||||||
that.addModel.parkSectionCodeList.splice(newIndex, 0, that.addModel.parkSectionCodeList.splice(oldIndex, 1)[0]);
|
|
||||||
const newArray = that.addModel.parkSectionCodeList.slice(0);
|
|
||||||
that.addModel.parkSectionCodeList = [];
|
|
||||||
that.$nextTick(function () {
|
|
||||||
that.addModel.parkSectionCodeList = newArray;
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
const newArray = that.addModel.parkSectionCodeList.slice(0);
|
|
||||||
that.addModel.parkSectionCodeList = [];
|
|
||||||
that.$nextTick(function () {
|
|
||||||
that.addModel.parkSectionCodeList = newArray;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
editData(data) {
|
|
||||||
this.isSave = false;
|
|
||||||
this.allowSelect = true;
|
|
||||||
this.isStartSelected = true;
|
|
||||||
this.editShow = true;
|
|
||||||
this.addModel = data;
|
|
||||||
},
|
|
||||||
changeStartStation() {
|
|
||||||
this.judgeAllowSelected();
|
|
||||||
this.addStartSectionData(true);
|
|
||||||
},
|
|
||||||
changeStartSection(data) {
|
|
||||||
const section = this.$store.getters['map/getDeviceByCode'](data);
|
|
||||||
if (section.belongStation) {
|
|
||||||
this.addModel.startStationCode = section.belongStation;
|
|
||||||
}
|
|
||||||
this.judgeAllowSelected();
|
|
||||||
this.addStartSectionData(false);
|
|
||||||
},
|
|
||||||
changeEndStation() {
|
|
||||||
this.judgeAllowSelected();
|
|
||||||
this.addEndSectionData(true);
|
|
||||||
},
|
|
||||||
changeEndSection(data) {
|
|
||||||
const section = this.$store.getters['map/getDeviceByCode'](data);
|
|
||||||
if (section.belongStation) {
|
|
||||||
this.addModel.endStationCode = section.belongStation;
|
|
||||||
}
|
|
||||||
this.judgeAllowSelected();
|
|
||||||
this.addEndSectionData(false);
|
|
||||||
},
|
|
||||||
changeBelongSection(code) {
|
|
||||||
const section = this.$store.getters['map/getDeviceByCode'](code);
|
|
||||||
if (section && section.belongStation) {
|
|
||||||
this.stationCode = section.belongStation;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
judgeAllowSelected() {
|
|
||||||
if (this.addModel.startStationCode != '' && this.addModel.startSectionCode != '' && this.addModel.endStationCode != '' && this.addModel.endSectionCode != '') {
|
|
||||||
this.allowSelect = true;
|
|
||||||
} else {
|
|
||||||
this.allowSelect = false;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
addStartSectionData(isStation) {
|
|
||||||
if (this.addModel.startStationCode != '' && this.addModel.startSectionCode != '') {
|
|
||||||
this.isStartSelected = true;
|
|
||||||
const result = this.pushSection({stationCode: this.addModel.startStationCode, sectionCode: this.addModel.startSectionCode}, 'top', isStation);
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
},
|
|
||||||
addEndSectionData(isStation) {
|
|
||||||
if (this.addModel.endStationCode != '' && this.addModel.endSectionCode != '') {
|
|
||||||
const result = this.pushSection({stationCode: this.addModel.endStationCode, sectionCode: this.addModel.endSectionCode}, 'bottom', isStation);
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
},
|
|
||||||
hover(field) {
|
|
||||||
this.field = field === this.field ? '' : field;
|
|
||||||
},
|
|
||||||
formatName(code) {
|
|
||||||
return formatName(code);
|
|
||||||
},
|
|
||||||
setSelected(selected) {
|
setSelected(selected) {
|
||||||
if (selected) {
|
if (selected) {
|
||||||
if (selected._type.toUpperCase() === 'Station'.toUpperCase() && this.field.toUpperCase() === 'startStationCode'.toUpperCase()) {
|
if (this.type == 'routeMap') { this.$refs.routeConfig.setSelected(selected); }
|
||||||
this.addModel.startStationCode = selected.code;
|
if (this.type == 'runplanParams') { this.$refs.runPlanConfig.setSelected(selected); }
|
||||||
this.judgeAllowSelected();
|
|
||||||
this.addStartSectionData(true);
|
|
||||||
} else if (selected._type.toUpperCase() === 'Station'.toUpperCase() && this.field.toUpperCase() === 'endStationCode'.toUpperCase()) {
|
|
||||||
this.addModel.endStationCode = selected.code;
|
|
||||||
this.judgeAllowSelected();
|
|
||||||
this.addEndSectionData(true);
|
|
||||||
} else if (selected._type.toUpperCase() === 'Section'.toUpperCase() && this.field.toUpperCase() === 'startSectionCode'.toUpperCase()) {
|
|
||||||
if (selected.standTrack || selected.reentryTrack || selected.transferTrack) {
|
|
||||||
if (selected.belongStation) {
|
|
||||||
this.addModel.startStationCode = selected.belongStation;
|
|
||||||
}
|
|
||||||
this.addModel.startSectionCode = selected.code;
|
|
||||||
this.judgeAllowSelected();
|
|
||||||
this.addStartSectionData(false);
|
|
||||||
} else {
|
|
||||||
// (折返轨/转换轨/站台轨对应的区段)
|
|
||||||
this.$message.error('请选择正确的起始区段');
|
|
||||||
}
|
|
||||||
} else if (selected._type.toUpperCase() === 'Section'.toUpperCase() && this.field.toUpperCase() === 'endSectionCode'.toUpperCase()) {
|
|
||||||
if (selected.standTrack || selected.reentryTrack || selected.transferTrack) {
|
|
||||||
if (selected.belongStation) {
|
|
||||||
this.addModel.endStationCode = selected.belongStation;
|
|
||||||
}
|
|
||||||
this.addModel.endSectionCode = selected.code;
|
|
||||||
this.judgeAllowSelected();
|
|
||||||
this.addEndSectionData(false);
|
|
||||||
this.addModel.destinationCode = selected.destinationCode || '';
|
|
||||||
} else {
|
|
||||||
this.$message.error('请选择正确的终到区段');
|
|
||||||
}
|
|
||||||
} else if (selected._type.toUpperCase() === 'Section'.toUpperCase() && this.field.toUpperCase() == 'routingSection'.toUpperCase()) {
|
|
||||||
if (selected.standTrack || selected.reentryTrack || selected.transferTrack) {
|
|
||||||
this.sectionCode = selected.code;
|
|
||||||
} else {
|
|
||||||
this.$message.error('请选择正确的区段');
|
|
||||||
}
|
|
||||||
} else if (selected._type.toUpperCase() === 'Station'.toUpperCase() && this.field.toUpperCase() == 'routingStation'.toUpperCase()) {
|
|
||||||
this.stationCode = selected.code;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
pushSection(data, type, isStation) {
|
|
||||||
const list = this.addModel.parkSectionCodeList;
|
|
||||||
if (data && data.stationCode && data.sectionCode) {
|
|
||||||
const index = list.findIndex(elem => { return elem.sectionCode == data.sectionCode; });
|
|
||||||
switch (type) {
|
|
||||||
case 'center': {
|
|
||||||
if (index < 0) {
|
|
||||||
list.splice(list.length - 1, 0, data);
|
|
||||||
} else {
|
|
||||||
this.$messageBox('该区段已经在交路区段中存在');
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 'top': {
|
|
||||||
if (isStation) {
|
|
||||||
list.splice(0, 1, data);
|
|
||||||
} else {
|
|
||||||
if (index < 0) {
|
|
||||||
list.splice(0, 1, data);
|
|
||||||
} else {
|
|
||||||
if (index == list.length - 1 && list.length >= 2) {
|
|
||||||
this.addModel.startSectionCode = list[0].sectionCode;
|
|
||||||
this.addModel.startStationCode = list[0].stationCode;
|
|
||||||
this.$messageBox('起始区段和终到区段不能相同');
|
|
||||||
} else if (index != list.length - 1 && index != 0) {
|
|
||||||
this.$messageBox('该区段已经在交路区段中存在');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 'bottom': {
|
|
||||||
if (isStation) {
|
|
||||||
if (list.length >= 2) {
|
|
||||||
list.splice(list.length - 1, 1, data);
|
|
||||||
} else {
|
|
||||||
if (index < 0) {
|
|
||||||
list.push(data);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (index < 0) {
|
|
||||||
if (list.length >= 2) {
|
|
||||||
list.splice(list.length - 1, 1, data);
|
|
||||||
} else {
|
|
||||||
list.push(data);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (index == 0 && list.length >= 2) {
|
|
||||||
this.addModel.endSectionCode = list[list.length - 1].sectionCode;
|
|
||||||
this.addModel.endStationCode = list[list.length - 1].stationCode;
|
|
||||||
this.$messageBox('起始区段和终到区段不能相同');
|
|
||||||
} else if (index != list.length - 1 && index != 0) {
|
|
||||||
this.$messageBox('该区段已经在交路区段中存在');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
default: {
|
|
||||||
if (index < 0) {
|
|
||||||
list.splice(list.length - 1, 0, data);
|
|
||||||
} else {
|
|
||||||
this.$messageBox(this.$t('tip.routeSameID'));
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.sectionCode = '';
|
|
||||||
this.stationCode = '';
|
|
||||||
}
|
|
||||||
},
|
|
||||||
deleteSection(list, index) {
|
|
||||||
const data = list.splice(index, 1);
|
|
||||||
if (data.length > 0) {
|
|
||||||
const section = this.$store.getters['map/getDeviceByCode'](data[0].sectionCode);
|
|
||||||
section.instance.drawBatchSelected(section, '');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
buildModel(code) {
|
|
||||||
const model = Object.assign({}, this.addModel);
|
|
||||||
// if (model.withLoop) { model.withLoop = true; } else { model.withLoop = false; }
|
|
||||||
model['mapId'] = this.$route.query.mapId;
|
|
||||||
model['userId'] = this.$store.state.user.id;
|
|
||||||
if (code) { model['code'] = code; }
|
|
||||||
return model;
|
|
||||||
},
|
|
||||||
save() {
|
|
||||||
this.addModel;
|
|
||||||
this.$refs.form.validate((valid) => {
|
|
||||||
if (valid) {
|
|
||||||
this.loading = true;
|
|
||||||
addRoutingData(this.buildModel(setUID('Routing'))).then(resp => {
|
|
||||||
this.$message.success(this.$t('tip.pathCreationSuccessful'));
|
|
||||||
this.loading = false;
|
|
||||||
this.clear();
|
|
||||||
}).catch((error) => {
|
|
||||||
this.$messageBox(this.$t('tip.createRoutingFailed') + ':' + error.message);
|
|
||||||
this.loading = false;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
update() {
|
|
||||||
this.$refs.form.validate((valid) => {
|
|
||||||
if (valid) {
|
|
||||||
this.loading = true;
|
|
||||||
const data = this.buildModel();
|
|
||||||
// delete data.withLoop;
|
|
||||||
updateRoutingData(data).then(resp => {
|
|
||||||
this.$message.success(this.$t('tip.pathUpdataSuccessful'));
|
|
||||||
this.loading = false;
|
|
||||||
this.clear();
|
|
||||||
}).catch((error) => {
|
|
||||||
this.$messageBox(this.$t('tip.pathUpdataFailed') + ':' + error.message);
|
|
||||||
this.loading = false;
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
batchSectionListFocus(flag) {
|
|
||||||
this.changeSectionSelected(this.addModel.parkSectionCodeList, flag);
|
|
||||||
},
|
|
||||||
changeSectionSelected(selectedList, flag) {
|
|
||||||
if (this.addModel.parkSectionCodeList && this.addModel.parkSectionCodeList.length > 0) {
|
|
||||||
if (flag) {
|
|
||||||
if (this.oldsection.length > 0) {
|
|
||||||
this.oldsection.forEach((section)=>{
|
|
||||||
section.instance.drawBatchSelected(section, '');
|
|
||||||
});
|
|
||||||
this.oldsection = [];
|
|
||||||
}
|
|
||||||
selectedList.forEach(each=>{
|
|
||||||
const section = this.$store.getters['map/getDeviceByCode'](each.sectionCode);
|
|
||||||
const list = section.logicSectionCodeList;
|
|
||||||
if (list && list.length > 0) {
|
|
||||||
list.forEach(logicSectionCode=>{
|
|
||||||
const logicSection = this.$store.getters['map/getDeviceByCode'](logicSectionCode);
|
|
||||||
this.oldsection.push(logicSection);
|
|
||||||
logicSection.instance.drawBatchSelected(section, 'routingSection');
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
this.oldsection.push(section);
|
|
||||||
section.instance.drawBatchSelected(section, 'routingSection');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
selectedList.forEach(each=>{
|
|
||||||
const section = this.$store.getters['map/getDeviceByCode'](each.sectionCode);
|
|
||||||
const list = section.logicSectionCodeList;
|
|
||||||
if (list && list.length > 0) {
|
|
||||||
list.forEach(logicSectionCode=>{
|
|
||||||
const logicSection = this.$store.getters['map/getDeviceByCode'](logicSectionCode);
|
|
||||||
logicSection.instance.drawBatchSelected(section, '');
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
section.instance.drawBatchSelected(section, '');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
clear() {
|
|
||||||
if (this.$refs && this.$refs.form) {
|
|
||||||
this.changeSectionSelected(this.addModel.parkSectionCodeList, false);
|
|
||||||
delete this.addModel.id;
|
|
||||||
this.$refs.form.resetFields();
|
|
||||||
this.addModel.mapId = this.$route.query.mapId;
|
|
||||||
this.addModel.parkSectionCodeList = [];
|
|
||||||
this.addModel.code = '';
|
|
||||||
this.stationCode = '';
|
|
||||||
this.sectionCode = '';
|
|
||||||
this.isSave = true;
|
|
||||||
this.allowSelect = false;
|
|
||||||
this.isStartSelected = false;
|
|
||||||
// this.addModel.withLoop = false;
|
|
||||||
this.editShow = false;
|
|
||||||
this.field = '';
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// batchSectionListFocus(flag) {
|
||||||
|
// this.changeSectionSelected(this.addModel.parkSectionCodeList, flag);
|
||||||
|
// },
|
||||||
onContextmenu() {
|
onContextmenu() {
|
||||||
|
|
||||||
},
|
},
|
||||||
close() {
|
close() {
|
||||||
this.dialogShow = false;
|
this.dialogShow = false;
|
||||||
|
if (this.type == 'routeMap') { this.$refs.routeConfig.createRouteEvent(); }
|
||||||
|
if (this.type == 'runplanParams') { this.$refs.runPlanConfig.clear(); }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -716,18 +144,41 @@ export default {
|
|||||||
|
|
||||||
<style lang="scss" scope>
|
<style lang="scss" scope>
|
||||||
.content-route{
|
.content-route{
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
/deep/ {
|
/deep/ {
|
||||||
.el-dialog__body{
|
.el-dialog__body{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: calc(100% - 54px);
|
height:100%;
|
||||||
|
flex:1;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.mapEdit_box{
|
.content-box{
|
||||||
float: right;
|
display:flex;
|
||||||
padding: 3px 0;
|
height:100%;
|
||||||
margin-right: 5px;
|
}
|
||||||
|
.routeMap{
|
||||||
|
height:100%;
|
||||||
|
overflow:auto;
|
||||||
|
width: 29%;
|
||||||
|
flex:1;
|
||||||
|
&::-webkit-scrollbar {
|
||||||
|
width: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&::-webkit-scrollbar-thumb {
|
||||||
|
border-radius: 10px;
|
||||||
|
background: #c3c3c3;
|
||||||
|
}
|
||||||
|
|
||||||
|
&::-webkit-scrollbar-track {
|
||||||
|
border-radius: 0;
|
||||||
|
background: #f0f0f0;
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
@ -361,8 +361,11 @@ export default {
|
|||||||
.map(serviceNumber => { return { serviceNumber }; });
|
.map(serviceNumber => { return { serviceNumber }; });
|
||||||
},
|
},
|
||||||
async analyticalTripNumber(data) {
|
async analyticalTripNumber(data) {
|
||||||
|
// this.tripNumberConfig.data = Object.keys(data || {})
|
||||||
|
// .sort((a, b) => { return data[a].tripNumber - data[b].tripNumber; })
|
||||||
|
// .map(tripNumber => { return { tripNumber }; });
|
||||||
this.tripNumberConfig.data = Object.keys(data || {})
|
this.tripNumberConfig.data = Object.keys(data || {})
|
||||||
.sort((a, b) => { return data[a].tripNumber - data[b].tripNumber; })
|
.sort((a, b) => { return data[a].oldIndex - data[b].oldIndex; })
|
||||||
.map(tripNumber => { return { tripNumber }; });
|
.map(tripNumber => { return { tripNumber }; });
|
||||||
},
|
},
|
||||||
async setPosition() {
|
async setPosition() {
|
||||||
@ -569,7 +572,6 @@ export default {
|
|||||||
this.option.title.text = this.mapName;
|
this.option.title.text = this.mapName;
|
||||||
}
|
}
|
||||||
this.myChart = echarts.init(document.getElementById(this.runPlanId));
|
this.myChart = echarts.init(document.getElementById(this.runPlanId));
|
||||||
// debugger;
|
|
||||||
// this.option;
|
// this.option;
|
||||||
this.myChart.setOption(this.option);
|
this.myChart.setOption(this.option);
|
||||||
this.reSize({ width: this.$store.state.runPlan.width, height: this.$store.state.runPlan.height });
|
this.reSize({ width: this.$store.state.runPlan.width, height: this.$store.state.runPlan.height });
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="PlanStatusBar">
|
<div class="PlanStatusBar">
|
||||||
<ul class="ul-box">
|
<ul class="ul-box">
|
||||||
<div v-if="isNotUser" class="li_plan" @click="showTrain">{{ $t('planMonitor.serviceAndTripNumber') }}</div>
|
<!-- v-if="isNotUser" -->
|
||||||
</ul>
|
<div class="li_plan" @click="showTrain">{{ $t('planMonitor.serviceAndTripNumber') }}</div>
|
||||||
<ul class="ul-box">
|
<div class="li_plan" @click="handleGernaratePlanningTrain">{{ $t('planMonitor.gerneratePlan') }}</div>
|
||||||
<div v-if="isNotUser" class="li_plan" @click="handleAddPlanningTrain">{{ $t('planMonitor.addPlan') }}</div>
|
<div class="li_plan" @click="handleAddPlanningTrain">{{ $t('planMonitor.addPlan') }}</div>
|
||||||
<div v-if="isNotUser" class="li_plan" @click="handleDeletePlanningTrain">{{ $t('planMonitor.deletePlan') }}</div>
|
<div class="li_plan" @click="handleDeletePlanningTrain">{{ $t('planMonitor.deletePlan') }}</div>
|
||||||
<div v-if="isNotUser" class="li_plan" @click="handleDuplicateTrain">{{ $t('planMonitor.duplicatePlan') }}</div>
|
<div class="li_plan" @click="handleDuplicateTrain">{{ $t('planMonitor.duplicatePlan') }}</div>
|
||||||
<div v-if="isNotUser" class="li_plan" @click="handleAddTask">{{ $t('planMonitor.addTask') }}</div>
|
<div class="li_plan" @click="handleAddTask">{{ $t('planMonitor.addTask') }}</div>
|
||||||
<div v-if="isNotUser" class="li_plan" @click="handleDeleteTask">{{ $t('planMonitor.deleteTask') }}</div>
|
<div class="li_plan" @click="handleDeleteTask">{{ $t('planMonitor.deleteTask') }}</div>
|
||||||
<div v-if="isNotUser" class="li_plan" @click="handleModifyingTask">{{ $t('planMonitor.modifyTask') }}</div>
|
<div class="li_plan" @click="handleModifyingTask">{{ $t('planMonitor.modifyTask') }}</div>
|
||||||
</ul>
|
</ul>
|
||||||
<ul class="ul-box tool">
|
<ul class="ul-box tool">
|
||||||
<div class="li_plan" @click="handlePlanEffectiveCheck">{{ $t('planMonitor.validityCheck') }}</div>
|
<div class="li_plan" @click="handlePlanEffectiveCheck">{{ $t('planMonitor.validityCheck') }}</div>
|
||||||
@ -35,18 +35,18 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
isNotUser: true
|
// isNotUser: true
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
if (/^\/plan\/usertool/.test(this.$route.fullPath)) {
|
// if (/^\/plan\/usertool/.test(this.$route.fullPath)) {
|
||||||
this.isNotUser = false;
|
// this.isNotUser = false;
|
||||||
} else {
|
// } else {
|
||||||
this.isNotUser = true;
|
// this.isNotUser = true;
|
||||||
}
|
// }
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
showTrain() {
|
showTrain() {
|
||||||
@ -61,6 +61,14 @@ export default {
|
|||||||
this.$messageBox(this.$t('tip.selectARunGraphFirst'));
|
this.$messageBox(this.$t('tip.selectARunGraphFirst'));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
handleGernaratePlanningTrain() {
|
||||||
|
const planId = this.$route.query.planId || this.loadRunPlanId;
|
||||||
|
if (planId) {
|
||||||
|
this.$emit('dispatchDialog', { name: 'gernaratePlanTrain', params: {} });
|
||||||
|
} else {
|
||||||
|
this.$messageBox(this.$t('tip.selectARunGraphFirst'));
|
||||||
|
}
|
||||||
|
},
|
||||||
// 删除计划
|
// 删除计划
|
||||||
handleDeletePlanningTrain() {
|
handleDeletePlanningTrain() {
|
||||||
const serviceNumber = this.$store.state.runPlan.selected.serviceNumber;
|
const serviceNumber = this.$store.state.runPlan.selected.serviceNumber;
|
||||||
|
Loading…
Reference in New Issue
Block a user