大铁线路 分路不良 输入密码操作
This commit is contained in:
parent
c071b6a98d
commit
595dcf0374
@ -250,6 +250,16 @@ export const menuOperate = {
|
||||
// 取消分路不良
|
||||
operation: OperationEvent.Switch.cancelDefectiveShunting.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_CANCEL_DEFECTIVE_SHUNTING
|
||||
},
|
||||
beforeForkDirective:{
|
||||
// 岔前分路不良
|
||||
operation: OperationEvent.Switch.defectiveShunting.before.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING_FRONT
|
||||
},
|
||||
locateForkDirective:{
|
||||
// 定位分路不良
|
||||
operation: OperationEvent.Switch.defectiveShunting.locate.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING_FIXED
|
||||
}
|
||||
},
|
||||
StationStand:{
|
||||
|
@ -0,0 +1,112 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="switch-control chengdou-03__systerm"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="300px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row justify="center" style="text-align: center;margin-bottom: 10px;">
|
||||
分路不良,请输入第1重密码
|
||||
</el-row>
|
||||
<el-row justify="center" style="text-align:center;">
|
||||
<el-input v-model="passwordCheck" placeholder="" size="medium" type="password" style="width: 180px;display: inline-block;margin-bottom: 10px;" />
|
||||
</el-row>
|
||||
<el-row v-if="showMistake" style="margin-bottom: 10px;text-align: center;">
|
||||
<el-col :span="22" :offset="1">
|
||||
<span class="password-error">*密码输入错误请重新输入*</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="3">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
export default {
|
||||
name: 'DefectivePasswordBox',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
/* 写死的初始密码*/
|
||||
correctPassword: '123',
|
||||
/* 输入值*/
|
||||
passwordCheck: '',
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
title:'铅封按钮,请输入密码',
|
||||
selected: null,
|
||||
showMistake: false,
|
||||
operation: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Switch.defectiveShunting.twoConfirm.domId : '';
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
doShow(operate) {
|
||||
this.operation = operate.operation;
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
if (this.passwordCheck === this.correctPassword) {
|
||||
this.$emit('checkOver', this.operation);
|
||||
this.doClose();
|
||||
this.inputClear();
|
||||
} else {
|
||||
this.showMistake = true;
|
||||
}
|
||||
},
|
||||
inputClear() {
|
||||
this.showMistake = false;
|
||||
this.passwordCheck = '';
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$root.$emit('dialogClose', this.selected);
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
}
|
||||
}
|
||||
};
|
||||
//
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.password-error {
|
||||
color: red;
|
||||
}
|
||||
</style>
|
146
src/jmapNew/theme/datie_02/menus/dialog/forkDirective.vue
Normal file
146
src/jmapNew/theme/datie_02/menus/dialog/forkDirective.vue
Normal file
@ -0,0 +1,146 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="switch-control chengdou-03__systerm"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="300px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row justify="center" class="ForkDirectiveTips">
|
||||
下发 "分路不良" 命令吗?
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="3">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
<defective-password-box ref="defectivePasswordBox" pop-class="chengdou-03__systerm" @checkOver="passWordCommit" />
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import DefectivePasswordBox from './childDialog/defectivePasswordBox';
|
||||
import { UserOperationType } from '@/scripts/ConstDic';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
export default {
|
||||
name: 'ForkDirective',
|
||||
components: {
|
||||
DefectivePasswordBox,
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
title:'分路不良',
|
||||
selected: null,
|
||||
operation: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Switch.defectiveShunting.confirm.domId : '';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
this.operation = operate.operation;
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
this.openPasswordBox(OperationEvent.Switch.defectiveShunting);
|
||||
},
|
||||
// 打开密码输入框
|
||||
openPasswordBox(operator) {
|
||||
const operate = {
|
||||
operation: operator.confirm.operation
|
||||
};
|
||||
this.loading = true;
|
||||
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.defectivePasswordBox.doShow({operation:this.operation});
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
passWordCommit(data) {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: data,
|
||||
userOperationType: UserOperationType.LEFTCLICK
|
||||
};
|
||||
switch (data) {
|
||||
case OperationEvent.Switch.defectiveShunting.before.operation: {
|
||||
operate.cmdType = CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING_FRONT;
|
||||
break;
|
||||
}
|
||||
case OperationEvent.Switch.defectiveShunting.locate.operation: {
|
||||
operate.cmdType = CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING_FIXED;
|
||||
break;
|
||||
}
|
||||
case OperationEvent.Switch.defectiveShunting.reverse.operation: {
|
||||
operate.cmdType = CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING_REVERSE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
this.$store.dispatch('trainingNew/next', operate).then(({valid}) => {
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$root.$emit('dialogClose', this.selected);
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.ForkDirectiveTips{
|
||||
margin-bottom: 16px;
|
||||
text-align: center;
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
@ -8,6 +8,7 @@
|
||||
<set-fault ref="setFault" pop-class="datie-02__systerm" />
|
||||
<draw-select ref="drawSelect" />
|
||||
<route-cancel ref="routeCancel" />
|
||||
<fork-directive ref="forkDirective" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -27,6 +28,7 @@ import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuO
|
||||
import RouteCancel from './menuDialog/routeCancel';
|
||||
import { UserOperationType } from '@/scripts/ConstDic';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import ForkDirective from './dialog/forkDirective';
|
||||
|
||||
export default {
|
||||
name: 'SwitchMenu',
|
||||
@ -38,7 +40,8 @@ export default {
|
||||
SetFault,
|
||||
SwitchHookLock,
|
||||
DrawSelect,
|
||||
RouteCancel
|
||||
RouteCancel,
|
||||
ForkDirective
|
||||
},
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
@ -338,50 +341,26 @@ export default {
|
||||
},
|
||||
// 岔前 分路不良
|
||||
beforeForkDirective() {
|
||||
const operate = {
|
||||
over: true,
|
||||
cmdType:CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING_FRONT,
|
||||
operation: OperationEvent.Switch.defectiveShunting.before.operation,
|
||||
userOperationType: UserOperationType.RIGHTCLICK,
|
||||
param:{
|
||||
sectionCode:this.selected.sectionACode
|
||||
commitOperate(menuOperate.Switch.beforeForkDirective, {sectionCode:this.selected.sectionACode}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.forkDirective.doShow(operate, this.selected);
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('trainingNew/next', operate).then(({valid}) => {
|
||||
// if (valid) {
|
||||
// }
|
||||
});
|
||||
},
|
||||
// 定位 分路不良
|
||||
locateForkDirective() {
|
||||
const operate = {
|
||||
over: true,
|
||||
cmdType:CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING_FIXED,
|
||||
operation: OperationEvent.Switch.defectiveShunting.locate.operation,
|
||||
userOperationType: UserOperationType.RIGHTCLICK,
|
||||
param:{
|
||||
sectionCode:this.selected.sectionACode
|
||||
commitOperate(menuOperate.Switch.locateForkDirective, {sectionCode:this.selected.sectionACode}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.forkDirective.doShow(operate, this.selected);
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('trainingNew/next', operate).then(({valid}) => {
|
||||
// if (valid) {
|
||||
// }
|
||||
});
|
||||
},
|
||||
// 反位 分路不良
|
||||
reverseForkDirective() {
|
||||
const operate = {
|
||||
over: true,
|
||||
cmdType:CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING_REVERSE,
|
||||
operation: OperationEvent.Switch.defectiveShunting.reverse.operation,
|
||||
userOperationType: UserOperationType.RIGHTCLICK,
|
||||
param:{
|
||||
sectionCode:this.selected.sectionACode
|
||||
commitOperate(menuOperate.Switch.locateForkDirective, {sectionCode:this.selected.sectionACode}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.forkDirective.doShow(operate, this.selected);
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('trainingNew/next', operate).then(({valid}) => {
|
||||
// if (valid) {
|
||||
// }
|
||||
});
|
||||
},
|
||||
// 区段确认空闲,取消分路不良
|
||||
|
@ -1309,6 +1309,18 @@ export const OperationEvent = {
|
||||
before:{
|
||||
operation: '11g',
|
||||
domId: '_Tips-Switch-DefectiveShunting-Before{TOP}'
|
||||
},
|
||||
confirm:{
|
||||
operation: '11h',
|
||||
domId: '_Tips-Switch-DefectiveShunting-confirm{TOP}'
|
||||
},
|
||||
password:{
|
||||
operation: '11i',
|
||||
domId: '_Tips-Switch-DefectiveShunting-password{TOP}'
|
||||
},
|
||||
twoConfirm:{
|
||||
operation: '11j',
|
||||
domId: '_Tips-Switch-DefectiveShunting-twoConfirm{TOP}'
|
||||
}
|
||||
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user