This commit is contained in:
fan 2022-06-20 17:45:13 +08:00
commit 58427fb837
4 changed files with 109 additions and 49 deletions

View File

@ -13,7 +13,7 @@
<div style="text-align: center;">
确定删除该列车的行车信息
</div>
<el-row justify="center" class="button-group">
<el-row justify="center" class="button-group" style="margin-top:20px">
<el-col :span="8" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>

View File

@ -18,6 +18,7 @@
placeholder=""
size="mini"
style="width:100px"
popper-class="stationSelect"
>
<el-option
v-for="item in stationList"
@ -35,6 +36,7 @@
placeholder=""
size="mini"
style="width:100px"
popper-class="stationSelect"
>
<el-option
v-for="item in stationList"
@ -46,7 +48,7 @@
<div style="display:inline-block"></div>
</div>
</div>
<el-row justify="center" class="button-group">
<el-row justify="center" class="button-group" style="margin-top:20px">
<el-col :span="8" :offset="4">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
@ -57,7 +59,7 @@
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
// import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
export default {
@ -67,6 +69,7 @@ export default {
dialogShow: false,
loading: false,
tripNumber:'',
stationList:[],
model:{
stationCode:'', //
runPlanCode:'', //
@ -76,9 +79,6 @@ export default {
};
},
computed: {
...mapGetters('map', [
'stationList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
@ -92,6 +92,9 @@ export default {
return '修改相关车站';
}
},
mounted() {
this.stationList = this.$store.state.map.map.stationList;
},
methods: {
doShow(row) {
this.model.stationCode = row.stationCode;
@ -144,3 +147,8 @@ export default {
.adjacentStationStart{margin-top: 10px;}
.adjacentStationEnd{margin-top: 10px;}
</style>
<style lang="scss">
.stationSelect{
z-index:2014 !important;
}
</style>

View File

@ -4,7 +4,7 @@
class="chengdou-03__systerm train-set-plan"
:title="title"
:visible.sync="show"
width="460px"
width="560px"
:before-close="doClose"
:z-index="2000"
:modal="false"
@ -15,10 +15,11 @@
<div class="modifyTripNumberT">
<div style="display:inline-block;margin-right:10px">请选择车站</div>
<el-select
v-model="model.stationCode"
v-model="stationCode"
placeholder=""
size="mini"
style="width:100px"
popper-class="stationSelect"
>
<el-option
v-for="item in stationList"
@ -33,23 +34,31 @@
<div class="modifyTripNumberTip">原列车信息</div>
<div class="modifyTripNumberS">
<div class="modifyTripNumberName">到达车次</div>
<el-input v-model="oldArriveTripNumber" type="text" class="" size="mini" style="width: 95px;" disabled />
<el-input v-model="oldArriveTripNumber" type="text" class="" size="mini" style="width: 140px;" disabled />
</div>
<div class="modifyTripNumberE">
<div class="modifyTripNumberName">出发车次</div>
<el-input v-model="oldDepartTripNumber" type="text" class="" size="mini" style="width: 95px;" disabled />
<el-input v-model="oldDepartTripNumber" type="text" class="" size="mini" style="width: 140px;" disabled />
</div>
</div>
<div class="modifyTripNumberBR">
<div class="modifyTripNumberTip">新列车信息</div>
<div class="modifyTripNumberS">
<div class="modifyTripNumberName">到达车次</div>
<div>
<el-form ref="form" :model="model" label-width="85px" :rules="rules">
<el-form-item label="到达车次:" prop="arriveTripNumber">
<el-input v-model="model.arriveTripNumber" style="width:140px" />
</el-form-item>
<el-form-item label="出发车次:" prop="departTripNumber">
<el-input v-model="model.departTripNumber" style="width:140px" />
</el-form-item>
</el-form>
<!-- <div class="modifyTripNumberName">到达车次</div>
<el-input v-model="model.arriveTripNumber" type="text" class="" size="mini" style="width: 95px;" />
</div>
<div class="modifyTripNumberE">
<div class="modifyTripNumberName">出发车次</div>
<el-input v-model="model.departTripNumber" type="text" class="" size="mini" style="width: 95px;" />
</div>
</div> -->
</div>
</div>
<el-checkbox-group v-model="trainTypeList" style="text-align:center;margin-top:10px">
@ -65,33 +74,56 @@
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
</el-dialog>
</div></el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
// import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
export default {
name: 'ModifyTripNumber',
data() {
var validateTripNumber = (rule, value, callback) => {
if (value) {
const judge = /^[a-zA-Z0-9]*[\d]$/.test(value);
if (judge) {
if (value.toString().length > 6 || value.toString().length < 2) {
callback('车次长度2-6位');
} else {
callback();
}
} else {
callback('字母+数字,最后一位数字');
}
} else {
callback('请输入车次');
}
};
return {
dialogShow: false,
loading: false,
oldArriveTripNumber:'',
oldDepartTripNumber:'',
trainTypeList:[],
model:{
stationList:[],
stationCode:'', //
runPlanCode:'', //
model:{
arriveTripNumber:'', //
departTripNumber:'' //
},
rules: {
arriveTripNumber:[
{ required: true, validator: validateTripNumber, trigger: 'blur' }
// message: ''
],
departTripNumber:[
{ required: true, validator: validateTripNumber, trigger: 'blur' }
]
}
};
},
computed: {
...mapGetters('map', [
'stationList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
@ -105,10 +137,13 @@ export default {
return '设置车次';
}
},
mounted() {
this.stationList = this.$store.state.map.map.stationList;
},
methods: {
doShow(row) {
this.model.stationCode = row.stationCode;
this.model.runPlanCode = row.code;
this.stationCode = row.stationCode;
this.runPlanCode = row.code;
this.oldArriveTripNumber = (row.arriveRunPlan && row.arriveRunPlan.tripNumber) || '';
this.oldDepartTripNumber = (row.departRunPlan && row.departRunPlan.tripNumber) || '';
this.dialogShow = true;
@ -120,8 +155,6 @@ export default {
this.loading = false;
this.dialogShow = false;
this.model = {
stationCode:'', //
runPlanCode:'', //
arriveTripNumber:'', //
departTripNumber:'' //
};
@ -129,7 +162,8 @@ export default {
},
commit() {
this.loading = true;
commitOperate(menuOperate.CTC.modifyTripNumber, this.model, 2).then(({valid})=>{
const params = Object.assign({stationCode:this.stationCode, runPlanCode:this.runPlanCode}, this.model);
commitOperate(menuOperate.CTC.modifyTripNumber, params, 2).then(({valid})=>{
this.loading = false;
this.$emit('clearRpRow');
if (valid) {
@ -174,11 +208,17 @@ export default {
background: #ece9d8;
padding: 0px 5px;
}
.modifyTripNumberS{}
.modifyTripNumberName{display: inline-block;}
.modifyTripNumberE{margin-top:10px;}
.modifyTripNumberS{margin-bottom:20px;height: 24px;font-size:0;}
.modifyTripNumberName{display: inline-block;width:85px;text-align: right;font-size: 15px;}
.modifyTripNumberE{margin-bottom: 20px;height: 24px;font-size:0;}
</style>
<style lang="scss">
.chengdou-03__systerm .el-dialog .modifyTripNumber .el-checkbox-group .el-checkbox .el-checkbox__label{font-size: 15px !important;line-height: 16px;}
.chengdou-03__systerm .el-dialog .modifyTripNumber .el-checkbox-group .el-checkbox .el-checkbox__input{vertical-align: top;line-height: 16px;}
.stationSelect{
z-index:2014 !important;
}
.modifyTripNumberBR .el-form-item .el-form-item__label{font-size:15px;padding-right:0px;line-height:24px;vertical-align:top;}
.modifyTripNumberBR .el-form-item{margin-bottom:20px;}
.modifyTripNumberBR .el-form-item .el-form-item__content{line-height:24px;vertical-align: top;height:24px;}
</style>

View File

@ -289,6 +289,7 @@
v-model="tableData[scope.$index].departRunPlan.sectionCode"
placeholder=""
size="mini"
popper-class="stationSelect"
@focus="focusDepartRunPlan($event,scope.row)"
@change="changeDepartRunPlan($event,scope.row,scope.$index)"
>
@ -604,16 +605,24 @@ export default {
window.removeEventListener('keydown', this.handleKeyDown);
},
handleKeyDown(event) {
if (!(this.$refs.modifyTripNumber.dialogShow ||
this.$refs.modifyAdjacentStation.dialogShow ||
this.$refs.deleteRunplan.dialogShow
)) {
event.stopPropagation();
event.preventDefault();
switch (event.code) {
case 'F1':
case 'F1': {
event.preventDefault();
this.sendNotcie();
break;
case 'F2':
}
case 'F2': {
event.preventDefault();
this.agreeNotcie();
break;
}
}
}
},
sendRunplan() {
if (document.getElementById('sendRunplan').className.includes('active')) {
@ -1022,6 +1031,9 @@ export default {
.eachRpSep{width:100%;height:0px;border-top:1px #80a6a9 solid}
</style>
<style lang="scss">
.stationSelect{
z-index:2014 !important;
}
#runplanContentTable.el-table .cell, .el-table--border td:first-child .cell, .el-table--border th:first-child .cell{
padding-left:0;
padding-right:0;