Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
ef8cedb389
@ -83,6 +83,7 @@ const ExamCourseDetail = () => import('@/views/exam/detail/courseDetail');
|
|||||||
const DemonstrationDetail = () => import('@/views/demonstration/detail/index');
|
const DemonstrationDetail = () => import('@/views/demonstration/detail/index');
|
||||||
|
|
||||||
const PlanMonitorEditTool = () => import('@/views/planMonitor/editTool/index');
|
const PlanMonitorEditTool = () => import('@/views/planMonitor/editTool/index');
|
||||||
|
const PlanMonitorNewEditTool = () => import('@/views/planMonitor/newEditTool/index');
|
||||||
const PlanMonitorEditAUSTool = () => import('@/views/planMonitor/editToolAUS/tool/index');
|
const PlanMonitorEditAUSTool = () => import('@/views/planMonitor/editToolAUS/tool/index');
|
||||||
const PlanMonitorEditAUSLine = () => import('@/views/planMonitor/editToolAUS/line/index');
|
const PlanMonitorEditAUSLine = () => import('@/views/planMonitor/editToolAUS/line/index');
|
||||||
const PlanMonitorDetail = () => import('@/views/planMonitor/detail');
|
const PlanMonitorDetail = () => import('@/views/planMonitor/detail');
|
||||||
@ -342,6 +343,11 @@ export const publicAsyncRoute = [
|
|||||||
component: PlanMonitorEditTool,
|
component: PlanMonitorEditTool,
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
|
{ // 哈尔滨运行图编辑
|
||||||
|
path: '/plan/newTool',
|
||||||
|
component: PlanMonitorNewEditTool,
|
||||||
|
hidden: true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: '/displayIscs/system',
|
path: '/displayIscs/system',
|
||||||
component: IscsSystem,
|
component: IscsSystem,
|
||||||
|
@ -65,6 +65,7 @@ const ExamCourseDetail = () => import('@/views/exam/detail/courseDetail');
|
|||||||
const DemonstrationDetail = () => import('@/views/demonstration/detail/index');
|
const DemonstrationDetail = () => import('@/views/demonstration/detail/index');
|
||||||
|
|
||||||
const PlanMonitorEditTool = () => import('@/views/planMonitor/editTool/index');
|
const PlanMonitorEditTool = () => import('@/views/planMonitor/editTool/index');
|
||||||
|
const PlanMonitorNewEditTool = () => import('@/views/planMonitor/newEditTool/index');
|
||||||
const PlanMonitorDetail = () => import('@/views/planMonitor/detail');
|
const PlanMonitorDetail = () => import('@/views/planMonitor/detail');
|
||||||
|
|
||||||
const DesignPlatformHome = () => import('@/views/designPlatform/home');
|
const DesignPlatformHome = () => import('@/views/designPlatform/home');
|
||||||
@ -226,6 +227,11 @@ export const publicAsyncRoute = [
|
|||||||
component: PlanMonitorEditTool,
|
component: PlanMonitorEditTool,
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
|
{ // 哈尔滨运行图编辑
|
||||||
|
path: '/plan/newTool',
|
||||||
|
component: PlanMonitorNewEditTool,
|
||||||
|
hidden: true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: '/displayIscs/system',
|
path: '/displayIscs/system',
|
||||||
component: IscsSystem,
|
component: IscsSystem,
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
<run-plan-view v-if="project!== 'bjd'" ref="runPlanView" :group="group" />
|
<run-plan-view v-if="project!== 'bjd'" ref="runPlanView" :group="group" />
|
||||||
<!-- 加载剧本列表弹窗 -->
|
<!-- 加载剧本列表弹窗 -->
|
||||||
<add-quest ref="addQuest" @selectQuest="selectQuest" />
|
<add-quest ref="addQuest" @selectQuest="selectQuest" />
|
||||||
<run-plan-edit v-if="isScheduling && isDepot" ref="runPlanEdit" />
|
<!-- <run-plan-edit v-if="isScheduling && isDepot" ref="runPlanEdit" /> -->
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@ -33,9 +33,10 @@ import FaultChoose from './demon/faultChoose';
|
|||||||
import AddQuest from './demon/addQuest';
|
import AddQuest from './demon/addQuest';
|
||||||
import { OperateMode } from '@/scripts/ConstDic';
|
import { OperateMode } from '@/scripts/ConstDic';
|
||||||
import { getByGroupStationList } from '@/api/jmap/map';
|
import { getByGroupStationList } from '@/api/jmap/map';
|
||||||
import RunPlanEdit from './demon/runPlanEdit';
|
// import RunPlanEdit from './demon/runPlanEdit';
|
||||||
import { getEveryDayRunPlanNew } from '@/api/simulation';
|
import { getEveryDayRunPlanNew } from '@/api/simulation';
|
||||||
import { getSessionStorage } from '@/utils/auth';
|
import { getSessionStorage } from '@/utils/auth';
|
||||||
|
import { getToken } from '@/utils/auth';
|
||||||
|
|
||||||
// 右上角操作
|
// 右上角操作
|
||||||
export default {
|
export default {
|
||||||
@ -45,7 +46,7 @@ export default {
|
|||||||
RunPlanView,
|
RunPlanView,
|
||||||
FaultChoose,
|
FaultChoose,
|
||||||
AddQuest,
|
AddQuest,
|
||||||
RunPlanEdit,
|
// RunPlanEdit,
|
||||||
SelectStation
|
SelectStation
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
@ -216,7 +217,20 @@ export default {
|
|||||||
this.$jlmap.updateShowMode(list, showMode); // 二次过滤
|
this.$jlmap.updateShowMode(list, showMode); // 二次过滤
|
||||||
},
|
},
|
||||||
runPlanEditShow() {
|
runPlanEditShow() {
|
||||||
this.$refs.runPlanEdit.doShow();
|
// this.$refs.runPlanEdit.doShow();
|
||||||
|
// const query = { lineCode: lineCode, mapId: this.$route.params.mapId, planId: planId, planName: planName };
|
||||||
|
// this.$router.push({ path: `/plan/tool`, query: query });
|
||||||
|
const routeData = this.$router.resolve({
|
||||||
|
path:'/plan/newTool',
|
||||||
|
query:{
|
||||||
|
mapId:this.$route.query.mapId,
|
||||||
|
lineCode:this.$route.query.lineCode,
|
||||||
|
token:getToken(),
|
||||||
|
project: this.project,
|
||||||
|
noPreLogout: true
|
||||||
|
}
|
||||||
|
});
|
||||||
|
window.open(routeData.href, '_blank', 'noopener noreferrer');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -151,6 +151,7 @@ export default {
|
|||||||
this.$store.dispatch('runPlan/refresh');
|
this.$store.dispatch('runPlan/refresh');
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
|
this.$messageBox('生成通用数据失败: ' + error.message);
|
||||||
this.doClose();
|
this.doClose();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
@ -48,6 +48,8 @@
|
|||||||
<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" />
|
||||||
|
<modifying-station-stop-time ref="modifyingStationStopTime" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -70,12 +72,17 @@ import ModifyingBeginTime from './menus/modifyingBeginTime';
|
|||||||
import EditStationBetweenTime from './menus/editStationBetweenTime';
|
import EditStationBetweenTime from './menus/editStationBetweenTime';
|
||||||
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';
|
||||||
import PopulatingGenericData from './menus/populatingGenericData';
|
// import PopulatingGenericData from './menus/populatingGenericData';
|
||||||
|
import PopulatingGenericData from '../editTool/menus/populatingGenericData';
|
||||||
import CreateEmptyPlan from './menus/createEmptyPlan';
|
import CreateEmptyPlan from './menus/createEmptyPlan';
|
||||||
|
import GernaratePlan from '../editTool/menus/gernaratePlanTrain';
|
||||||
|
import ModifyingStationStopTime from '../editTool/menus/modifyingStationStopTime';
|
||||||
|
import ModifyingStationIntervalTime from '../editTool/menus/modifyingStationIntervalTime';
|
||||||
import { deletePlanService } from '@/api/runplan';
|
import { deletePlanService } from '@/api/runplan';
|
||||||
import { checkLoginLine } from '@/api/login';
|
import { checkLoginLine } from '@/api/login';
|
||||||
import { getRpListByMapId } from '@/api/runplan';
|
import { getRpListByMapId } from '@/api/runplan';
|
||||||
|
import { getPublishMapDetailById } from '@/api/jmap/map';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Menus',
|
name: 'Menus',
|
||||||
@ -100,7 +107,9 @@ export default {
|
|||||||
EditSmoothRunTime,
|
EditSmoothRunTime,
|
||||||
ModifyingStationIntervalTime,
|
ModifyingStationIntervalTime,
|
||||||
CreateEmptyPlan,
|
CreateEmptyPlan,
|
||||||
EditPlanName
|
EditPlanName,
|
||||||
|
GernaratePlan,
|
||||||
|
ModifyingStationStopTime
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -125,12 +134,13 @@ export default {
|
|||||||
created() {
|
created() {
|
||||||
this.PlanConvert = this.$theme.loadPlanConvert(this.lineCode);
|
this.PlanConvert = this.$theme.loadPlanConvert(this.lineCode);
|
||||||
},
|
},
|
||||||
mounted() {
|
async mounted() {
|
||||||
this.timeDemon = setInterval(() => {
|
this.timeDemon = setInterval(() => {
|
||||||
checkLoginLine();
|
checkLoginLine();
|
||||||
}, 5000 * 60);
|
}, 5000 * 60);
|
||||||
if (this.$route.query.mapId) {
|
if (this.$route.query.mapId) {
|
||||||
this.refreshRunPlanList(true);
|
this.refreshRunPlanList(true);
|
||||||
|
await this.loadMap();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
@ -180,6 +190,12 @@ export default {
|
|||||||
refresh() {
|
refresh() {
|
||||||
this.$store.dispatch('runPlan/refresh');
|
this.$store.dispatch('runPlan/refresh');
|
||||||
},
|
},
|
||||||
|
async loadMap() {
|
||||||
|
const res = await getPublishMapDetailById(this.$route.query.mapId);
|
||||||
|
if (res && res.code == 200) {
|
||||||
|
this.$store.dispatch('map/setMapData', res.data.graphDataNew);
|
||||||
|
}
|
||||||
|
},
|
||||||
refreshRunPlanList(planId) {
|
refreshRunPlanList(planId) {
|
||||||
getRpListByMapId(this.$route.query.mapId).then(resp => {
|
getRpListByMapId(this.$route.query.mapId).then(resp => {
|
||||||
this.runPlanList = resp.data || [];
|
this.runPlanList = resp.data || [];
|
||||||
@ -199,7 +215,8 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
this.$emit('doClose');
|
// this.$emit('doClose');
|
||||||
|
window.close();
|
||||||
},
|
},
|
||||||
loadingRunPlan(param) {
|
loadingRunPlan(param) {
|
||||||
this.loadRunPlanId = param.planId;
|
this.loadRunPlanId = param.planId;
|
||||||
|
@ -126,6 +126,7 @@
|
|||||||
<el-button type="primary" @click="confirmPublish">确 定</el-button>
|
<el-button type="primary" @click="confirmPublish">确 定</el-button>
|
||||||
</span>
|
</span>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
<route-map ref="routeMap" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@ -133,10 +134,12 @@ import { mapGetters } from 'vuex';
|
|||||||
import { planEffectiveCheck } from '@/api/runplan';
|
import { planEffectiveCheck } from '@/api/runplan';
|
||||||
import { EventBus } from '@/scripts/event-bus';
|
import { EventBus } from '@/scripts/event-bus';
|
||||||
import { publishRunPlanAllUser } from '@/api/designPlatform';
|
import { publishRunPlanAllUser } from '@/api/designPlatform';
|
||||||
|
import routeMap from '../editTool/routingoperate/routeMap';
|
||||||
import { deleteRunPlan } from '@/api/runplan';
|
import { deleteRunPlan } from '@/api/runplan';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'PlanMenuBar',
|
name: 'PlanMenuBar',
|
||||||
|
components: { routeMap },
|
||||||
props: {
|
props: {
|
||||||
planConvert: {
|
planConvert: {
|
||||||
type: Object,
|
type: Object,
|
||||||
@ -221,6 +224,10 @@ export default {
|
|||||||
{
|
{
|
||||||
title: this.$t('planMonitor.modify'),
|
title: this.$t('planMonitor.modify'),
|
||||||
children: [
|
children: [
|
||||||
|
{
|
||||||
|
title: '生成计划',
|
||||||
|
click: this.handleGernaratePlanningTrain
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('planMonitor.addPlan'),
|
title: this.$t('planMonitor.addPlan'),
|
||||||
click: this.handleAddPlanningTrain
|
click: this.handleAddPlanningTrain
|
||||||
@ -253,6 +260,27 @@ export default {
|
|||||||
click: this.modifyRunPlanName
|
click: this.modifyRunPlanName
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '配置',
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
title: '交路设置',
|
||||||
|
click: this.handleRoutingSettings
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '参数配置',
|
||||||
|
click: this.handleRunplanParams
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '停站时间',
|
||||||
|
click: this.handleDwellTime
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '运行等级',
|
||||||
|
click: this.handleRoutingLevel
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
@ -300,11 +328,12 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
back() {
|
back() {
|
||||||
// this.$router.push({ path: `${UrlConfig.plan.detail}/${this.$route.query.mapId}` });
|
// this.$router.push({ path: `${UrlConfig.plan.detail}/${this.$route.query.mapId}` });
|
||||||
if (this.dispaly) {
|
// if (this.dispaly) {
|
||||||
|
// this.$emit('doClose');
|
||||||
|
// } else {
|
||||||
|
// this.$router.go(-1);
|
||||||
|
// }
|
||||||
this.$emit('doClose');
|
this.$emit('doClose');
|
||||||
} else {
|
|
||||||
this.$router.go(-1);
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
menuConvert(menuBase) {
|
menuConvert(menuBase) {
|
||||||
const menus = [];
|
const menus = [];
|
||||||
@ -417,13 +446,17 @@ export default {
|
|||||||
background: 'rgba(0, 0, 0, 0.7)'
|
background: 'rgba(0, 0, 0, 0.7)'
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 修改站间运行时间
|
// // 修改站间运行时间
|
||||||
handleModifyingStationIntervalTime() {
|
// handleModifyingStationIntervalTime() {
|
||||||
this.$emit('dispatchDialog', { name: 'modifyingStationIntervalTime', params: {} });
|
// this.$emit('dispatchDialog', { name: 'modifyingStationIntervalTime', params: {} });
|
||||||
},
|
// },
|
||||||
// 填充计划运行图
|
// 填充计划运行图
|
||||||
populatingGenericData() {
|
populatingGenericData() {
|
||||||
|
if (this.loadRunPlanId) {
|
||||||
this.$emit('dispatchDialog', { name: 'populatingGenericData', params: {} });
|
this.$emit('dispatchDialog', { name: 'populatingGenericData', params: {} });
|
||||||
|
} else {
|
||||||
|
this.$messageBox(this.$t('tip.selectARunGraphFirst'));
|
||||||
|
}
|
||||||
},
|
},
|
||||||
newRunPlan() {
|
newRunPlan() {
|
||||||
this.$emit('dispatchDialog', { name: 'createEmptyPlan', params: {}});
|
this.$emit('dispatchDialog', { name: 'createEmptyPlan', params: {}});
|
||||||
@ -432,6 +465,38 @@ export default {
|
|||||||
handleAutoGenerate() {
|
handleAutoGenerate() {
|
||||||
this.$emit('dispatchDialog', { name: 'editSmoothRunTime', params: {} });
|
this.$emit('dispatchDialog', { name: 'editSmoothRunTime', params: {} });
|
||||||
},
|
},
|
||||||
|
// 停站时间
|
||||||
|
handleDwellTime() {
|
||||||
|
if (this.loadRunPlanId) {
|
||||||
|
this.$emit('dispatchDialog', { name: 'modifyingStationStopTime', params: {} });
|
||||||
|
} else {
|
||||||
|
this.$messageBox(this.$t('tip.selectARunGraphFirst'));
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 运行等级
|
||||||
|
handleRoutingLevel() {
|
||||||
|
if (this.loadRunPlanId) {
|
||||||
|
this.$emit('dispatchDialog', { name: 'modifyingStationIntervalTime', params: {} });
|
||||||
|
} else {
|
||||||
|
this.$messageBox(this.$t('tip.selectARunGraphFirst'));
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 交路设置
|
||||||
|
handleRoutingSettings() {
|
||||||
|
this.$refs.routeMap.doShow('routeMap');
|
||||||
|
},
|
||||||
|
// 运行图配置文件
|
||||||
|
handleRunplanParams() {
|
||||||
|
this.$refs.routeMap.doShow('runplanParams');
|
||||||
|
},
|
||||||
|
// 生成计划
|
||||||
|
handleGernaratePlanningTrain() {
|
||||||
|
if (this.loadRunPlanId) {
|
||||||
|
this.$emit('dispatchDialog', { name: 'gernaratePlanTrain', params: {} });
|
||||||
|
} else {
|
||||||
|
this.$messageBox(this.$t('tip.selectARunGraphFirst'));
|
||||||
|
}
|
||||||
|
},
|
||||||
// 校验运行图
|
// 校验运行图
|
||||||
handlePlanEffectiveCheck() {
|
handlePlanEffectiveCheck() {
|
||||||
if (this.loadRunPlanId) {
|
if (this.loadRunPlanId) {
|
||||||
|
@ -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,14 +36,14 @@
|
|||||||
</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"
|
||||||
@ -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 {
|
||||||
@ -178,16 +189,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: '',
|
||||||
@ -223,9 +235,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');
|
||||||
}
|
}
|
||||||
@ -233,13 +245,13 @@ 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.loadRunPlanId;
|
this.addModel.planId = this.loadRunPlanId;
|
||||||
this.addModel.arriveConfigList = [];
|
this.addModel.arriveConfigList = [];
|
||||||
const planId = this.loadRunPlanId;
|
const planId = this.loadRunPlanId;
|
||||||
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;
|
||||||
const startStationFilterMap = {};
|
const startStationFilterMap = {};
|
||||||
const endStationFilterMap = {};
|
const endStationFilterMap = {};
|
||||||
@ -270,11 +282,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) {
|
||||||
@ -328,73 +346,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 {
|
||||||
@ -413,8 +450,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') }}
|
||||||
@ -82,7 +82,7 @@ export default {
|
|||||||
isNew:true,
|
isNew:true,
|
||||||
model: {
|
model: {
|
||||||
serviceNumber: '',
|
serviceNumber: '',
|
||||||
debugTrain: false,
|
// debugTrain: false,
|
||||||
tripConfigList: []
|
tripConfigList: []
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -111,13 +111,14 @@ export default {
|
|||||||
SDTNumber: `${this.model.serviceNumber}${tripNumber}`
|
SDTNumber: `${this.model.serviceNumber}${tripNumber}`
|
||||||
};
|
};
|
||||||
getRoutingBySDTNumber(model).then(resp => {
|
getRoutingBySDTNumber(model).then(resp => {
|
||||||
|
debugger;
|
||||||
const taskObj = {
|
const taskObj = {
|
||||||
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,
|
||||||
@ -150,13 +151,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);
|
||||||
});
|
});
|
||||||
@ -207,7 +209,7 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleEditTask() {
|
handleEditTask() {
|
||||||
// if (this.currentRow.routingCode || this.currentRow.tripNumber) {
|
// routingCode || this.currentRow.tripNumber
|
||||||
if (this.currentRow.id) {
|
if (this.currentRow.id) {
|
||||||
this.$emit('dispatchDialog', {
|
this.$emit('dispatchDialog', {
|
||||||
name: 'modifyingTask', params: {
|
name: 'modifyingTask', params: {
|
||||||
@ -287,14 +289,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('请增加任务');
|
||||||
@ -302,6 +308,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.loadRunPlanId, this.model.serviceNumber, this.model).then(() => {
|
updatePlanService(this.loadRunPlanId, this.model.serviceNumber, this.model).then(() => {
|
||||||
this.$emit('refresh');
|
this.$emit('refresh');
|
||||||
// this.$emit('dispatchOperate', {
|
// this.$emit('dispatchOperate', {
|
||||||
|
@ -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.loadRunPlanId;
|
this.planId = this.loadRunPlanId;
|
||||||
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.loadRunPlanId,
|
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;
|
||||||
|
}
|
||||||
|
case speedLevelData.l4: {
|
||||||
|
this.defaultSpeedLevel = 'l4';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case speedLevelData.l5: {
|
||||||
|
this.defaultSpeedLevel = 'l5';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default: {
|
||||||
|
this.defaultSpeedLevel = 'l1';
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
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);
|
|
||||||
},
|
},
|
||||||
|
// 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.loadRunPlanId,
|
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,15 +1,18 @@
|
|||||||
<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 v-if="isNotUser" class="li_plan" @click="handleDeletePlanningTrain">{{ $t('planMonitor.deletePlan') }}</div>
|
<!-- <ul class="ul-box"> -->
|
||||||
<div v-if="isNotUser" class="li_plan" @click="handleDuplicateTrain">{{ $t('planMonitor.duplicatePlan') }}</div>
|
<div class="li_plan" @click="handleAddPlanningTrain">{{ $t('planMonitor.addPlan') }}</div>
|
||||||
<div v-if="isNotUser" class="li_plan" @click="handleAddTask">{{ $t('planMonitor.addTask') }}</div>
|
<div class="li_plan" @click="handleDeletePlanningTrain">{{ $t('planMonitor.deletePlan') }}</div>
|
||||||
<div v-if="isNotUser" class="li_plan" @click="handleDeleteTask">{{ $t('planMonitor.deleteTask') }}</div>
|
<div class="li_plan" @click="handleDuplicateTrain">{{ $t('planMonitor.duplicatePlan') }}</div>
|
||||||
<div v-if="isNotUser" class="li_plan" @click="handleModifyingTask">{{ $t('planMonitor.modifyTask') }}</div>
|
<div class="li_plan" @click="handleAddTask">{{ $t('planMonitor.addTask') }}</div>
|
||||||
|
<div class="li_plan" @click="handleDeleteTask">{{ $t('planMonitor.deleteTask') }}</div>
|
||||||
|
<div class="li_plan" @click="handleModifyingTask">{{ $t('planMonitor.modifyTask') }}</div>
|
||||||
|
<!-- </ul> -->
|
||||||
</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>
|
||||||
@ -20,8 +23,8 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
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';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'PlanStatusBar',
|
name: 'PlanStatusBar',
|
||||||
@ -35,19 +38,19 @@ 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() {
|
||||||
this.$emit('showTrain');
|
this.$emit('showTrain');
|
||||||
@ -136,6 +139,14 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
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'));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// 测试运行图
|
// 测试运行图
|
||||||
// async handleTestRunPlan() {
|
// async handleTestRunPlan() {
|
||||||
|
@ -113,7 +113,7 @@ export default {
|
|||||||
title: '归属项目',
|
title: '归属项目',
|
||||||
prop: 'projectCode',
|
prop: 'projectCode',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return row.project ? this.$convertField(row.projectCode.toLowerCase(), ProjectList, ['value', 'label']) : '无'; },
|
columnValue: (row) => { return row.project ? this.$convertField((row.projectCode || '').toLowerCase(), ProjectList, ['value', 'label']) : '无'; },
|
||||||
tagType: (row) => { return ''; }
|
tagType: (row) => { return ''; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user