运行图代码调整
This commit is contained in:
parent
ab4f13d5f0
commit
181a1491da
@ -60,7 +60,7 @@ export default {
|
||||
},
|
||||
handleCommit() {
|
||||
if (this.$route.query.planId || this.loadRunPlanId) {
|
||||
if (this.serviceNumber.length == 2) {
|
||||
if (this.serviceNumber.length >= 2 && this.serviceNumber.length <= 3) {
|
||||
checkServiceNumberExist({ planId: this.$route.query.planId || this.loadRunPlanId, serviceNumber: this.serviceNumber }).then(resp => {
|
||||
if (resp.data) {
|
||||
this.$emit('dispatchDialog', {
|
||||
@ -79,7 +79,7 @@ export default {
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.$messageBox(this.$t('tip.serviceNumberLengthHint'));
|
||||
this.$messageBox('长度在二到三位');
|
||||
}
|
||||
} else {
|
||||
this.$messageBox(this.$t('tip.chooseToOpenTheRunGraph'));
|
||||
|
@ -43,14 +43,15 @@
|
||||
<span>{{ $t('planMonitor.defaultStopTime') }}</span>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-select v-model="defaultStopTime" size="mini" :placeholder="this.$t('global.choose')">
|
||||
<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-option
|
||||
v-for="item in defaultStopTimeList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-select> -->
|
||||
</el-col>
|
||||
<el-col :span="3" style="margin-left: 20px;height: 28px;line-height: 28px;">
|
||||
<span>{{ $t('planMonitor.defaultRunLevel') }}</span>
|
||||
@ -172,13 +173,13 @@ export default {
|
||||
startStationCode: '',
|
||||
startTime: '00:00:00',
|
||||
endTime: '',
|
||||
// planId: '',
|
||||
// tripNumber: '',
|
||||
// serviceNumber: '',
|
||||
arriveConfigList: []
|
||||
arriveConfigList: [],
|
||||
tripNumber: '',
|
||||
planId: '',
|
||||
serviceNumber: ''
|
||||
},
|
||||
tripNumberList: [{ value: '', label: this.$t('planMonitor.automatic') }],
|
||||
defaultStopTimeList: [{ value: '30', label: this.$t('planMonitor.default') }, { value: '0', label: '0' }],
|
||||
// defaultStopTimeList: [{ value: '30', label: this.$t('planMonitor.default') }, { value: '0', label: '0' }],
|
||||
defaultSpeedLevelList: [
|
||||
{ value: 'l1', label: '等级一' },
|
||||
{ value: 'l2', label: '等级二' },
|
||||
@ -197,8 +198,10 @@ export default {
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'addModel.routingCode': function () {
|
||||
this.computedDetailList('routingCode');
|
||||
'addModel.routingCode': function (val) {
|
||||
if (val) {
|
||||
this.computedDetailList('routingCode');
|
||||
}
|
||||
},
|
||||
'addModel.startTime': function () {
|
||||
this.computedDetailList();
|
||||
@ -212,10 +215,11 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
loadInitData(params) {
|
||||
debugger;
|
||||
this.isPlan = params.isPlan;
|
||||
// this.addModel.taskIndex = getUID('task_');
|
||||
// this.addModel.serviceNumber = params.serviceNumber;
|
||||
// this.addModel.planId = this.$route.query.planId;
|
||||
this.addModel.serviceNumber = params.serviceNumber;
|
||||
this.addModel.planId = this.$route.query.planId;
|
||||
this.addModel.arriveConfigList = [];
|
||||
const planId = this.$route.query.planId;
|
||||
if (planId) {
|
||||
@ -351,11 +355,7 @@ export default {
|
||||
const runLevel = this.defaultSpeedLevel || 'l3'; // 默认等级三
|
||||
list.forEach((elem, index) => {
|
||||
if (type == 'defaultStopTime' || type == 'routingCode') {
|
||||
elem.stopTime = this.defaultStopTime == '0' ? 0 : 30;
|
||||
} else {
|
||||
if (!elem.stopTime) {
|
||||
this.defaultStopTime = 30;
|
||||
}
|
||||
elem.stopTime = parseInt(this.defaultStopTime);
|
||||
}
|
||||
elem.arriveTime = index ? formatTime(tempTime) : '';
|
||||
if (index > 0) {
|
||||
@ -392,11 +392,14 @@ export default {
|
||||
this.addModel.routingCode = row.code;
|
||||
},
|
||||
handleCommit() {
|
||||
debugger;
|
||||
if (this.isPlan) {
|
||||
// 计划添加任务
|
||||
this.$emit('dispatchOperate', { dialogName: 'editPlanningTrain', operate: 'handleConfirmAddTask', params: Object.assign({}, this.addModel) });
|
||||
this.addModel.routingCode = '';
|
||||
} else {
|
||||
// 直接添加任务
|
||||
delete this.addModel.tripNumber;
|
||||
addPlanTrip(this.addModel).then(resp => {
|
||||
// this.$emit('dispatchOperate', {
|
||||
// dialogName: 'openRunPlan', operate: 'loadRunPlanData', params: Object.assign({refresh: true}, this.$route.query)
|
||||
|
@ -112,7 +112,6 @@ export default {
|
||||
SDTNumber: `${this.model.serviceNumber}${tripNumber}`
|
||||
};
|
||||
getRoutingBySDTNumber(model).then(resp => {
|
||||
debugger;
|
||||
const taskObj = {
|
||||
tripNumber: tripNumber,
|
||||
startStationCode: resp.data.startStationCode,
|
||||
|
@ -42,7 +42,8 @@
|
||||
<span>{{ $t('planMonitor.modifying.defaultStopTime') }}</span>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-select
|
||||
<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"
|
||||
@ -54,7 +55,7 @@
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-select> -->
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
@ -254,7 +255,7 @@ export default {
|
||||
PlanConvert: {},
|
||||
parkSectionCodeList:[],
|
||||
stopStationMap: {},
|
||||
defaultStopTime: '30',
|
||||
defaultStopTime: 0,
|
||||
defaultSpeedLevel: 'l3',
|
||||
routingList: [],
|
||||
tripNumber: '',
|
||||
@ -278,7 +279,7 @@ export default {
|
||||
// outStock: false
|
||||
},
|
||||
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') }],
|
||||
serialNumberList: [],
|
||||
defaultSpeedLevelList: [
|
||||
@ -353,11 +354,7 @@ export default {
|
||||
const runLevel = this.defaultSpeedLevel || 'l3'; // 默认等级三
|
||||
list.forEach((elem, index) => {
|
||||
if (type == 'defaultStopTime' || type == 'routingCode') {
|
||||
elem.stopTime = this.defaultStopTime == '0' ? 0 : 30;
|
||||
} else {
|
||||
if (!elem.stopTime) {
|
||||
this.defaultStopTime = 30;
|
||||
}
|
||||
elem.stopTime = parseInt(this.defaultStopTime);
|
||||
}
|
||||
elem.arriveTime = index ? formatTime(tempTime) : '';
|
||||
if (index > 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user