Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test_cunzai
This commit is contained in:
commit
82f38c349b
@ -74,7 +74,7 @@ export default {
|
||||
handleServiceNumber() {
|
||||
let newValue = parseInt(this.serviceNumber);
|
||||
if (newValue) {
|
||||
if (newValue > 0 & newValue < 9) {
|
||||
if (newValue > 0 & newValue <= 9) {
|
||||
newValue = '00' + newValue;
|
||||
} else if (newValue > 10 & newValue < 99) {
|
||||
newValue = '0' + newValue;
|
||||
|
@ -243,7 +243,8 @@ export default {
|
||||
this.reSize({ width: this.$store.state.runPlan.width, height: this.$store.state.runPlan.height });
|
||||
},
|
||||
'$store.state.runPlan.refreshCount': function() {
|
||||
if (this.planId || this.loadRunPlanId) {
|
||||
// || this.loadRunPlanId
|
||||
if (this.planId) {
|
||||
this.loadChartPage();
|
||||
}
|
||||
},
|
||||
@ -252,8 +253,8 @@ export default {
|
||||
// this.loadChartPage();
|
||||
// });
|
||||
// },
|
||||
loadRunPlanId() {
|
||||
if (this.planId || this.loadRunPlanId) {
|
||||
planId() {
|
||||
if (this.planId) {
|
||||
this.loadChartPage();
|
||||
} else {
|
||||
this.clearCanvas();
|
||||
@ -268,6 +269,9 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
this.setPosition();
|
||||
if (this.planId) {
|
||||
this.loadChartPage();
|
||||
}
|
||||
// this.loadChartPage();
|
||||
},
|
||||
beforeDestroy() {
|
||||
@ -325,7 +329,12 @@ export default {
|
||||
this.analyticalTripNumber(serviceObj.trainMap || {});
|
||||
},
|
||||
tripNumberChange(row) {
|
||||
const serviceNumber = this.$store.state.runPlan.selected.serviceNumber;
|
||||
let serviceNumber;
|
||||
if (this.loadRunPlanId) {
|
||||
serviceNumber = this.$store.state.runPlan.draftSelected.serviceNumber;
|
||||
} else {
|
||||
serviceNumber = this.$store.state.runPlan.selected.serviceNumber;
|
||||
}
|
||||
let tripNumber = null;
|
||||
if (row) {
|
||||
const data = [];
|
||||
@ -367,7 +376,6 @@ export default {
|
||||
}, 50);
|
||||
|
||||
}
|
||||
|
||||
if (this.loadRunPlanId) {
|
||||
this.$store.dispatch('runPlan/setDraftSelected', { serviceNumber: serviceNumber, tripNumber: tripNumber });
|
||||
} else {
|
||||
@ -433,7 +441,11 @@ export default {
|
||||
// });
|
||||
// } else {
|
||||
getPublishMapInfo(this.$route.query.mapId).then(resp => {
|
||||
if (this.loadRunPlanId) {
|
||||
this.mapName = this.$route.query.planName || this.loadRunPlanName || '';
|
||||
} else {
|
||||
this.mapName = `${resp.data.name} (${this.$route.query.planName || this.loadRunPlanName || ''})`;
|
||||
}
|
||||
});
|
||||
// }
|
||||
|
||||
@ -654,7 +666,12 @@ export default {
|
||||
},
|
||||
refreshRunPlanName(name) {
|
||||
getPublishMapInfo(this.$route.query.mapId).then(resp => {
|
||||
if (this.loadRunPlanId) {
|
||||
this.mapName = name;
|
||||
} else {
|
||||
this.mapName = `${resp.data.name} (${name})`;
|
||||
}
|
||||
|
||||
this.myChart.setOption({
|
||||
title: {
|
||||
text: this.mapName,
|
||||
|
@ -2,28 +2,31 @@
|
||||
<div class="plan-tool" style="width: 100%; height: 100%;">
|
||||
<menu-bar
|
||||
ref="menuBar"
|
||||
:load-run-plan-id="loadRunPlanId"
|
||||
@doClose="doClose"
|
||||
@refresh="refresh"
|
||||
@dispatchDialog="dispatchDialog"
|
||||
@loadingRunPlan="loadingRunPlan"
|
||||
@modifyRunPlanName="modifyRunPlanName"
|
||||
/>
|
||||
|
||||
<!-- :load-run-plan-id="loadRunPlanId" -->
|
||||
<!-- @loadingRunPlan="loadingRunPlan" -->
|
||||
<!-- @checkIsLoadRunPlan="checkIsLoadRunPlan" -->
|
||||
<div class="scheduleIn">
|
||||
<schedule
|
||||
ref="schedule"
|
||||
v-loading="runplanLoading"
|
||||
:plan-parser="PlanParser"
|
||||
:load-run-plan-id="loadRunPlanId"
|
||||
:load-run-plan-name="loadRunPlanName"
|
||||
/>
|
||||
<status-bar ref="statusBar" :load-run-plan-id="loadRunPlanId" @dispatchDialog="dispatchDialog" @showTrain="showTrain" @refresh="refresh" />
|
||||
<!-- :load-run-plan-id="loadRunPlanId" -->
|
||||
<status-bar ref="statusBar" @dispatchDialog="dispatchDialog" @showTrain="showTrain" @refresh="refresh" />
|
||||
<!-- :load-run-plan-id="loadRunPlanId" -->
|
||||
</div>
|
||||
<parameter ref="parameter" />
|
||||
<!-- 删除计划 -->
|
||||
<off-line ref="offLine" @handleConfirm="handleConfirm" @dispatchDialog="dispatchDialog" />
|
||||
<add-planning-train ref="addPlanningTrain" :load-run-plan-id="loadRunPlanId" @dispatchDialog="dispatchDialog" />
|
||||
<add-planning-train ref="addPlanningTrain" @dispatchDialog="dispatchDialog" />
|
||||
<!-- :load-run-plan-id="loadRunPlanId" -->
|
||||
<edit-planning-train
|
||||
ref="editPlanningTrain"
|
||||
@dispatchDialog="dispatchDialog"
|
||||
@ -179,10 +182,10 @@ export default {
|
||||
doClose() {
|
||||
this.$emit('doClose');
|
||||
},
|
||||
loadingRunPlan(param) {
|
||||
this.loadRunPlanId = param.planId;
|
||||
this.loadRunPlanName = param.planName;
|
||||
},
|
||||
// loadingRunPlan(param) {
|
||||
// // this.loadRunPlanId = param.planId;
|
||||
// this.loadRunPlanName = param.planName;
|
||||
// },
|
||||
checkIsLoadRunPlan(planId) {
|
||||
// this.refreshRunPlanList(planId === this.loadRunPlanId);
|
||||
},
|
||||
|
@ -133,13 +133,13 @@ export default {
|
||||
default: function() {
|
||||
return { };
|
||||
}
|
||||
},
|
||||
loadRunPlanId: {
|
||||
type: String,
|
||||
default: function() {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
// loadRunPlanId: {
|
||||
// type: String,
|
||||
// default: function() {
|
||||
// return '';
|
||||
// }
|
||||
// }
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -475,7 +475,7 @@ export default {
|
||||
},
|
||||
// 测试运行图
|
||||
async handleTestRunPlan() {
|
||||
const data = { planId: this.$route.query.planId || this.loadRunPlanId };
|
||||
const data = { planId: this.$route.query.planId };
|
||||
runPlanNotify(data).then(resp => {
|
||||
if (resp.data) {
|
||||
const query = {
|
||||
@ -497,7 +497,7 @@ export default {
|
||||
},
|
||||
// 添加计划
|
||||
handleAddPlanningTrain() {
|
||||
const planId = this.$route.query.planId || this.loadRunPlanId;
|
||||
const planId = this.$route.query.planId;
|
||||
if (planId) {
|
||||
this.$emit('dispatchDialog', { name: 'addPlanningTrain', params: {} });
|
||||
} else {
|
||||
@ -606,9 +606,9 @@ export default {
|
||||
const params = this.$store.state.runPlan.selected;
|
||||
this.$emit('dispatchDialog', { name: 'modifyingBeginTime', params });
|
||||
},
|
||||
loadingRunPlan(param) {
|
||||
this.$emit('loadingRunPlan', param);
|
||||
},
|
||||
// loadingRunPlan(param) {
|
||||
// this.$emit('loadingRunPlan', param);
|
||||
// },
|
||||
// deleteRunPlanOperate(param) {
|
||||
// // 删除运行图
|
||||
// this.$confirm(this.$t('planMonitor.openRunPlan.confirmDeleteRunPlan'), this.$t('tip.hint'), {
|
||||
|
@ -27,12 +27,12 @@ import { UrlConfig } from '@/scripts/ConstDic';
|
||||
export default {
|
||||
name: 'PlanStatusBar',
|
||||
props: {
|
||||
loadRunPlanId: {
|
||||
type: String,
|
||||
default() {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
// loadRunPlanId: {
|
||||
// type: String,
|
||||
// default() {
|
||||
// return '';
|
||||
// }
|
||||
// }
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -49,7 +49,7 @@ export default {
|
||||
},
|
||||
// 添加计划
|
||||
handleAddPlanningTrain() {
|
||||
const planId = this.$route.query.planId || this.loadRunPlanId;
|
||||
const planId = this.$route.query.planId;
|
||||
if (planId) {
|
||||
this.$emit('dispatchDialog', { name: 'addPlanningTrain', params: {} });
|
||||
} else {
|
||||
@ -57,7 +57,7 @@ export default {
|
||||
}
|
||||
},
|
||||
handleGernarateRouting() {
|
||||
const planId = this.$route.query.planId || this.loadRunPlanId;
|
||||
const planId = this.$route.query.planId;
|
||||
if (planId) {
|
||||
this.$emit('dispatchDialog', { name: 'generateRouting', params: {} });
|
||||
} else {
|
||||
|
@ -212,6 +212,7 @@ export default {
|
||||
},
|
||||
refreshRunPlanName(name) {
|
||||
this.$refs.schedule.refreshRunPlanName(name);
|
||||
this.refreshRunPlanList(this.loadRunPlanId);
|
||||
this.$router.replace({ path: this.$route.path, query: { ...this.$route.query, planName: name }});
|
||||
}
|
||||
}
|
||||
|
@ -73,7 +73,7 @@ export default {
|
||||
},
|
||||
// 删除计划
|
||||
handleDeletePlanningTrain() {
|
||||
const serviceNumber = this.$store.state.runPlan.selected.serviceNumber;
|
||||
const serviceNumber = this.$store.state.runPlan.draftSelected.serviceNumber;
|
||||
if (serviceNumber) {
|
||||
this.$emit('dispatchDialog', {
|
||||
name: 'offLine', params: {
|
||||
@ -90,7 +90,7 @@ export default {
|
||||
}
|
||||
},
|
||||
handleMovePlanningTrain() {
|
||||
const serviceNumber = this.$store.state.runPlan.selected.serviceNumber;
|
||||
const serviceNumber = this.$store.state.runPlan.draftSelected.serviceNumber;
|
||||
if (serviceNumber) {
|
||||
this.$emit('dispatchDialog', { name: 'movePlaningTrain', params: { serviceNumber } });
|
||||
} else {
|
||||
@ -99,7 +99,7 @@ export default {
|
||||
},
|
||||
// 复制计划
|
||||
handleDuplicateTrain() {
|
||||
const serviceNumber = this.$store.state.runPlan.selected.serviceNumber;
|
||||
const serviceNumber = this.$store.state.runPlan.draftSelected.serviceNumber;
|
||||
if (serviceNumber) {
|
||||
this.$emit('dispatchDialog', { name: 'duplicateTrain', params: { serviceNumber } });
|
||||
} else {
|
||||
@ -108,7 +108,7 @@ export default {
|
||||
},
|
||||
// 添加任务
|
||||
handleAddTask() {
|
||||
const params = this.$store.state.runPlan.selected;
|
||||
const params = this.$store.state.runPlan.draftSelected;
|
||||
if (params.serviceNumber && params.tripNumber) {
|
||||
this.$emit('dispatchDialog', { name: 'addTask', params });
|
||||
} else {
|
||||
@ -117,7 +117,7 @@ export default {
|
||||
},
|
||||
// 删除任务
|
||||
handleDeleteTask() {
|
||||
const params = this.$store.state.runPlan.selected;
|
||||
const params = this.$store.state.runPlan.draftSelected;
|
||||
if (params.serviceNumber && params.tripNumber) {
|
||||
this.$emit('dispatchDialog', { name: 'deleteTask', params });
|
||||
} else {
|
||||
@ -126,7 +126,7 @@ export default {
|
||||
},
|
||||
// 修改任务
|
||||
handleModifyingTask() {
|
||||
const params = this.$store.state.runPlan.selected;
|
||||
const params = this.$store.state.runPlan.draftSelected;
|
||||
if (params.serviceNumber && params.tripNumber) {
|
||||
this.$emit('dispatchDialog', { name: 'modifyingTask', params });
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user