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