哈尔滨设备登陆 车辆段 运行图编辑 报错调整
This commit is contained in:
parent
4f74d4b33d
commit
a1b42ba0c0
@ -189,6 +189,14 @@ export default {
|
||||
name: 'AddTask',
|
||||
components: {
|
||||
},
|
||||
props: {
|
||||
loadRunPlanId: {
|
||||
type: String,
|
||||
default() {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
@ -262,7 +270,7 @@ export default {
|
||||
loadInitData(params) {
|
||||
this.isPlan = params.isPlan;
|
||||
this.addModel.serviceNumber = params.serviceNumber;
|
||||
this.addModel.planId = this.$route.query.planId;
|
||||
this.addModel.planId = this.$route.query.planId || this.loadRunPlanId;
|
||||
this.addModel.arriveConfigList = [];
|
||||
const mapId = this.$route.query.mapId;
|
||||
|
||||
|
@ -30,6 +30,14 @@ export default {
|
||||
name: 'DeleteTask',
|
||||
components: {
|
||||
},
|
||||
props: {
|
||||
loadRunPlanId: {
|
||||
type: String,
|
||||
default() {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
@ -70,7 +78,7 @@ export default {
|
||||
} else {
|
||||
// 直接删除任务
|
||||
const model = {
|
||||
planId: this.$route.query.planId,
|
||||
planId: this.$route.query.planId || this.loadRunPlanId,
|
||||
SDTNumber: `${this.model.serviceNumber}${this.model.tripNumber}`,
|
||||
deleteBefore: this.model.deleteBefore
|
||||
};
|
||||
|
@ -43,6 +43,14 @@ export default {
|
||||
name: 'DuplicateTrain',
|
||||
components: {
|
||||
},
|
||||
props: {
|
||||
loadRunPlanId: {
|
||||
type: String,
|
||||
default() {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
@ -72,7 +80,7 @@ export default {
|
||||
this.dialogShow = false;
|
||||
},
|
||||
handleCommit() {
|
||||
this.model['planId'] = this.$route.query.planId;
|
||||
this.model['planId'] = this.$route.query.planId || this.loadRunPlanId;
|
||||
this.model['serviceNumber'] = this.model.serviceNumber;
|
||||
this.doClose();
|
||||
duplicateService(this.model).then(resp => {
|
||||
|
@ -33,6 +33,14 @@
|
||||
import { updateTripNumber, updateServiceNumber } from '@/api/runplan';
|
||||
export default {
|
||||
name:'ModifyService',
|
||||
props: {
|
||||
loadRunPlanId: {
|
||||
type: String,
|
||||
default() {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow:false,
|
||||
@ -78,7 +86,7 @@ export default {
|
||||
if (this.isModifyServiceNumber) {
|
||||
const result = /^\d{2,}$/.test(this.serviceNumber);
|
||||
if (this.serviceNumber && result) {
|
||||
updateServiceNumber(this.$route.query.planId, this.oldServiceNumber, this.serviceNumber).then(res=>{
|
||||
updateServiceNumber(this.$route.query.planId || this.loadRunPlanId, this.oldServiceNumber, this.serviceNumber).then(res=>{
|
||||
this.$message.success('修改计划号成功');
|
||||
// this.$emit('refresh');
|
||||
this.dialogShow = false;
|
||||
@ -94,7 +102,7 @@ export default {
|
||||
const result = /^\d{2,}$/.test(this.tripNumber);
|
||||
if (this.tripNumber && result) {
|
||||
const SDTNumber = this.oldServiceNumber + this.oldTripNumber;
|
||||
updateTripNumber(this.$route.query.planId, SDTNumber, this.tripNumber).then(res=>{
|
||||
updateTripNumber(this.$route.query.planId || this.loadRunPlanId, SDTNumber, this.tripNumber).then(res=>{
|
||||
this.$message.success('修改车次号成功');
|
||||
// this.$emit('refresh');
|
||||
this.dialogShow = false;
|
||||
|
@ -18,7 +18,7 @@
|
||||
/>
|
||||
<!-- @touch="trainNumTouch" -->
|
||||
</div>
|
||||
<modify-service ref="modifyService" />
|
||||
<modify-service ref="modifyService" :load-run-plan-id="loadRunPlanId" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -229,7 +229,7 @@ export default {
|
||||
'stations'
|
||||
]),
|
||||
planId() {
|
||||
return this.$route.query.planId;
|
||||
return this.$route.query.planId || this.loadRunPlanId;
|
||||
},
|
||||
maxWidth() {
|
||||
return this.$store.state.app.width;
|
||||
|
@ -33,12 +33,12 @@
|
||||
@dispatchOperate="dispatchOperate"
|
||||
@refresh="refresh"
|
||||
/>
|
||||
<duplicate-train ref="duplicateTrain" @dispatchDialog="dispatchDialog" @dispatchOperate="dispatchOperate" @refresh="refresh" />
|
||||
<duplicate-train ref="duplicateTrain" :load-run-plan-id="loadRunPlanId" @dispatchDialog="dispatchDialog" @dispatchOperate="dispatchOperate" @refresh="refresh" />
|
||||
<move-planing-train ref="movePlaningTrain" :load-run-plan-id="loadRunPlanId" @dispatchDialog="dispatchDialog" @dispatchOperate="dispatchOperate" @refresh="refresh" />
|
||||
|
||||
<systerm-out ref="systermOut" />
|
||||
<add-task ref="addTask" @dispatchOperate="dispatchOperate" @refresh="refresh" />
|
||||
<delete-task ref="deleteTask" @dispatchOperate="dispatchOperate" @refresh="refresh" />
|
||||
<add-task ref="addTask" :load-run-plan-id="loadRunPlanId" @dispatchOperate="dispatchOperate" @refresh="refresh" />
|
||||
<delete-task ref="deleteTask" :load-run-plan-id="loadRunPlanId" @dispatchOperate="dispatchOperate" @refresh="refresh" />
|
||||
<modifying-task ref="modifyingTask" :load-run-plan-id="loadRunPlanId" @dispatchOperate="dispatchOperate" @refresh="refresh" />
|
||||
|
||||
<modifying-station-interval-time ref="modifyingStationIntervalTime" />
|
||||
@ -156,7 +156,7 @@ export default {
|
||||
} else if (params.operate == 'DeletePlanningTrain') {
|
||||
// 删除计划
|
||||
const model = {
|
||||
planId: this.$route.query.planId,
|
||||
planId: this.loadRunPlanId,
|
||||
serviceNumber: params.serviceNumber
|
||||
};
|
||||
deletePlanService(model).then(resp => {
|
||||
|
@ -567,7 +567,7 @@ export default {
|
||||
},
|
||||
// 添加计划
|
||||
handleAddPlanningTrain() {
|
||||
const planId = this.$route.query.planId || this.loadRunPlanId;
|
||||
const planId = this.loadRunPlanId;
|
||||
if (planId) {
|
||||
this.$emit('dispatchDialog', { name: 'addPlanningTrain', params: {} });
|
||||
} else {
|
||||
|
@ -56,7 +56,7 @@ export default {
|
||||
},
|
||||
// 添加计划
|
||||
handleAddPlanningTrain() {
|
||||
const planId = this.$route.query.planId || this.loadRunPlanId;
|
||||
const planId = this.loadRunPlanId;
|
||||
if (planId) {
|
||||
this.$emit('dispatchDialog', { name: 'addPlanningTrain', params: {} });
|
||||
} else {
|
||||
@ -64,7 +64,7 @@ export default {
|
||||
}
|
||||
},
|
||||
handleGernaratePlanningTrain() {
|
||||
const planId = this.$route.query.planId || this.loadRunPlanId;
|
||||
const planId = this.loadRunPlanId;
|
||||
if (planId) {
|
||||
this.$emit('dispatchDialog', { name: 'gernaratePlanTrain', params: {} });
|
||||
} else {
|
||||
@ -140,7 +140,7 @@ export default {
|
||||
cancelButtonText: '取消',
|
||||
center: true
|
||||
}).then(() => {
|
||||
clearPlaningData(this.$route.query.planId).then(resp => {
|
||||
clearPlaningData(this.loadRunPlanId).then(resp => {
|
||||
console.log('清除数据成功!');
|
||||
this.$emit('refresh');
|
||||
}).catch(() => {
|
||||
@ -152,7 +152,7 @@ export default {
|
||||
},
|
||||
// 校验运行图
|
||||
handlePlanEffectiveCheck() {
|
||||
const planId = this.$route.query.planId;
|
||||
const planId = this.loadRunPlanId;
|
||||
if (planId) {
|
||||
if (/^\/plan\/usertool/.test(this.$route.fullPath)) {
|
||||
this.$messageBox(' 功能待完善');
|
||||
|
Loading…
Reference in New Issue
Block a user