大铁项目 ctc 车务管理端 列车固定路径 增加 车次校验规则
列表调整
This commit is contained in:
parent
4ef230a4e4
commit
7d7718c1a1
@ -108,6 +108,22 @@ export default {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
var validateTripNumber = (rule, value, callback) => {
|
||||
if (value) {
|
||||
const judge = /^[a-zA-Z0-9]*[\d]$/.test(value);
|
||||
if (judge) {
|
||||
if (value.toString().length > 2 || value.toString().length < 6) {
|
||||
callback('车次长度2-6位');
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
} else {
|
||||
callback('字母+数字,最后一位数字');
|
||||
}
|
||||
} else {
|
||||
callback('请输入车次');
|
||||
}
|
||||
};
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
@ -131,11 +147,13 @@ export default {
|
||||
{ required: true, message: '请选择股道', trigger: 'change' }
|
||||
],
|
||||
arriveTripNumber:[
|
||||
{ required: true, message: '请输入到达车次', trigger: 'blur' }
|
||||
{ required: true, validator: validateTripNumber, trigger: 'blur' }
|
||||
// message: '请输入到达车次'
|
||||
],
|
||||
departTripNumber:[
|
||||
{ required: true, message: '请输入到达车次', trigger: 'blur' }
|
||||
{ required: true, validator: validateTripNumber, trigger: 'blur' }
|
||||
],
|
||||
// message: '请输入出发车次'
|
||||
arriveTime: [
|
||||
{ required: true, message: '请选择到达时间', trigger: 'blur' },
|
||||
{ required: true, message: '请选择到达时间', trigger: 'change' }
|
||||
@ -160,7 +178,6 @@ export default {
|
||||
{ required: true, message: '请选择前方车站', trigger: 'blur' },
|
||||
{ required: true, message: '请选择前方车站', trigger: 'change' }
|
||||
]
|
||||
// { validator: validateJudgePass, trigger: 'blur' }
|
||||
}
|
||||
};
|
||||
},
|
||||
|
@ -397,10 +397,15 @@ export default {
|
||||
that.$message.error('发布失败');
|
||||
});
|
||||
},
|
||||
coverTime(time) {
|
||||
return time.split(':').splice(0, 2).join(':');
|
||||
},
|
||||
handleData() {
|
||||
this.tableData = [];
|
||||
const railCtcStationManageRpMsg = copyAssign({}, this.$store.state.socket.railCtcStationManageRpMsg);
|
||||
this.tableData = Object.values(railCtcStationManageRpMsg).filter(data=>{
|
||||
data.arriveTime = this.coverTime(data.arriveTime);
|
||||
data.departTime = this.coverTime(data.departTime);
|
||||
return data.stationCode == this.currentStationCode;
|
||||
});
|
||||
// stationCode 车站编码
|
||||
|
Loading…
Reference in New Issue
Block a user