代码调整
This commit is contained in:
parent
c83cf31bf3
commit
ae86731795
172
src/jmapNew/theme/datie_02/menus/dialog/modifyTripNumber.vue
Normal file
172
src/jmapNew/theme/datie_02/menus/dialog/modifyTripNumber.vue
Normal file
@ -0,0 +1,172 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm train-set-plan"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="460px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div class="modifyTripNumber">
|
||||
<!-- 修改车次号(大铁CTC) -->
|
||||
<div class="modifyTripNumberT">
|
||||
<div style="display:inline-block;margin-right:10px">请选择车站</div>
|
||||
<el-select
|
||||
v-model="model.stationCode"
|
||||
placeholder=""
|
||||
size="mini"
|
||||
style="width:100px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in stationList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="modifyTripNumberB">
|
||||
<div class="modifyTripNumberBL">
|
||||
<div class="modifyTripNumberTip">原列车信息</div>
|
||||
<div class="modifyTripNumberS">
|
||||
<div class="modifyTripNumberName">到达车次:</div>
|
||||
<el-input type="text" class="" size="mini" style="width: 95px;" disabled />
|
||||
</div>
|
||||
<div class="modifyTripNumberE">
|
||||
<div class="modifyTripNumberName">出发车次:</div>
|
||||
<el-input type="text" class="" size="mini" style="width: 95px;" disabled />
|
||||
</div>
|
||||
</div>
|
||||
<div class="modifyTripNumberBR">
|
||||
<div class="modifyTripNumberTip">新列车信息</div>
|
||||
<div class="modifyTripNumberS">
|
||||
<div class="modifyTripNumberName">到达车次:</div>
|
||||
<el-input type="text" class="" size="mini" style="width: 95px;" />
|
||||
</div>
|
||||
<div class="modifyTripNumberE">
|
||||
<div class="modifyTripNumberName">出发车次:</div>
|
||||
<el-input type="text" class="" size="mini" style="width: 95px;" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="1">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
export default {
|
||||
name: 'ModifyTripNumber',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
model:{
|
||||
stationCode:'', // 车站编码
|
||||
runPlanCode:'', // 运行编码
|
||||
arriveTripNumber:'', // 到达车次
|
||||
departTripNumber:'' // 发车车次
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.CTCCommand.modifyTripNumber.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '设置车次';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(row) {
|
||||
this.model.stationCode = row.stationCode;
|
||||
this.model.runPlanCode = row.code;
|
||||
this.model.arriveTripNumber = (row.arriveRunPlan && row.arriveRunPlan.tripNumber) || '';
|
||||
this.model.departTripNumber = (row.departRunPlan && row.departRunPlan.tripNumber) || '';
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
this.loading = true;
|
||||
commitOperate(menuOperate.CTC.modifyTripNumber, this.model, 2).then(({valid})=>{
|
||||
this.loading = false;
|
||||
this.$emit('clearRpRow');
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.$emit('clearRpRow');
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
this.$emit('clearRpRow');
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.modifyTripNumber{font-size: 15px;color:#201f1e;}
|
||||
.modifyTripNumberT{}
|
||||
.modifyTripNumberB{margin-top:20px;color:#201f1e;}
|
||||
.modifyTripNumberBL,.modifyTripNumberBR{
|
||||
width: 49%;
|
||||
display: inline-block;
|
||||
border: 1px #999795 solid;
|
||||
padding:20px 10px 10px 10px;
|
||||
position: relative;
|
||||
}
|
||||
.modifyTripNumberTip{
|
||||
position:absolute;
|
||||
left:10px;
|
||||
top:-10px;
|
||||
background: #ece9d8;
|
||||
padding: 0px 5px;
|
||||
}
|
||||
.modifyTripNumberS{}
|
||||
.modifyTripNumberName{display: inline-block;}
|
||||
.modifyTripNumberE{margin-top:10px;}
|
||||
</style>
|
Loading…
Reference in New Issue
Block a user