89 lines
2.8 KiB
Vue
89 lines
2.8 KiB
Vue
|
<template>
|
||
|
<el-dialog
|
||
|
v-dialogDrag
|
||
|
class="datie-02__systerm"
|
||
|
:title="title"
|
||
|
:visible.sync="show"
|
||
|
width="560px"
|
||
|
:before-close="doClose"
|
||
|
:z-index="2000"
|
||
|
:modal="false"
|
||
|
:close-on-click-modal="false"
|
||
|
>
|
||
|
<div style="text-align:right;display:inline-block;width:100%;">
|
||
|
<div style="display:inline-block">
|
||
|
<el-button :id="domIdCancel" @click="cancel">取消</el-button>
|
||
|
</div>
|
||
|
<div style="display:inline-block">
|
||
|
<el-button :id="domIdConfirm " type="primary" :loading="loading" @click="commit">确定 </el-button>
|
||
|
</div>
|
||
|
</div>
|
||
|
</el-dialog>
|
||
|
</template>
|
||
|
<script>
|
||
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||
|
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||
|
export default {
|
||
|
name: 'AddRunPlan',
|
||
|
data() {
|
||
|
return {
|
||
|
dialogShow: false,
|
||
|
loading: false
|
||
|
};
|
||
|
},
|
||
|
computed: {
|
||
|
show() {
|
||
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||
|
},
|
||
|
domIdCancel() {
|
||
|
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||
|
},
|
||
|
domIdConfirm() {
|
||
|
return this.dialogShow ? OperationEvent.CTCCommand.addTrainFixedPath.menu.domId : '';
|
||
|
},
|
||
|
title() {
|
||
|
return '股道信息';
|
||
|
}
|
||
|
},
|
||
|
methods:{
|
||
|
doShow({row, filterSectionMap}) {
|
||
|
this.filterSectionList = Object.values(filterSectionMap);
|
||
|
this.dialogShow = true;
|
||
|
this.$nextTick(function () {
|
||
|
this.$store.dispatch('training/emitTipFresh');
|
||
|
});
|
||
|
},
|
||
|
doClose() {
|
||
|
this.loading = false;
|
||
|
this.dialogShow = false;
|
||
|
},
|
||
|
commit() {
|
||
|
// this.$refs.form.validate((valid) => {
|
||
|
// if (valid) {
|
||
|
// this.loading = true;
|
||
|
// const param = {stationCode:this.addModel.stationCode, runPlanParamList:[this.addModel]};
|
||
|
// commitOperate(menuOperate.CTC.addTrainFixedPath, param, 3).then(({valid})=>{
|
||
|
// if (valid) {
|
||
|
// this.doClose();
|
||
|
// }
|
||
|
// }).catch(() => {
|
||
|
// this.doClose();
|
||
|
// this.$emit('noticeInfo');
|
||
|
// });
|
||
|
// }
|
||
|
// });
|
||
|
},
|
||
|
cancel() {
|
||
|
const operate = {
|
||
|
operation: OperationEvent.Command.cancel.menu.operation
|
||
|
};
|
||
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||
|
if (valid) {
|
||
|
this.doClose();
|
||
|
}
|
||
|
}).catch(() => { this.doClose(); });
|
||
|
}
|
||
|
}
|
||
|
};
|
||
|
</script>
|