This commit is contained in:
zyy 2020-01-10 17:11:41 +08:00
commit d3d64c7c91
59 changed files with 201 additions and 9319 deletions

View File

@ -1,9 +1,19 @@
<template> <template>
<el-dialog class="chengdou-03__systerm notice-info" :title="title" :visible.sync="show" width="360px" <el-dialog
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag> v-dialogDrag
class="chengdou-01__systerm notice-info"
:title="title"
:visible.sync="show"
width="360px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
append-to-body
>
<div class="context"> <div class="context">
<template v-for="message in messages"> <template v-for="message in messages">
<span>{{message}}</span><br> <span>{{ message }}</span><br>
</template> </template>
</div> </div>
<el-row justify="center" class="button-group"> <el-row justify="center" class="button-group">
@ -16,16 +26,16 @@
</template> </template>
<script> <script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default { export default {
name: 'NoticeInfo', name: 'NoticeInfo',
data() { data() {
return { return {
dialogShow: false, dialogShow: false,
messages: ['命令下达失败'], messages: ['命令下达失败'],
operate: null operate: null
} };
}, },
computed: { computed: {
show() { show() {
@ -41,7 +51,7 @@
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.$store.dispatch('training/tipReload'); this.$store.dispatch('training/tipReload');
}) });
}, },
methods: { methods: {
doShow(operate, messages) { doShow(operate, messages) {
@ -66,7 +76,7 @@
this.doClose(); this.doClose();
} }
} }
} };
</script> </script>
<style> <style>

View File

@ -1,145 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm confirm-control"
:title="title"
:visible.sync="show"
width="360px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
append-to-body
>
<div class="context">
<template v-for="(message, index) in messages">
<span :key="index">{{ message }}</span>
</template>
</div>
<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="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from './childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'ConfirmControl',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
operate: {},
messages: '',
operation: null
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
return '信号关灯';
}
return '';
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
if (this.dialogShow) {
if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
/** 信号关灯*/
return OperationEvent.Signal.signalClose.confirm.domId;
}
}
return '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate) {
if (!this.dialogShow) {
this.loading = false;
this.operate = operate || {};
this.messages = operate.messages;
this.operation = operate.operation;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
/** 信号关灯*/
this.signalClose();
}
},
//
signalClose() {
const operate = {
over: true,
operation: OperationEvent.Signal.signalClose.confirm.operation,
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
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>
<style>
.confirm-control .context {
padding-bottom: 40px !important;
border: 1px solid lightgray;
}
</style>

View File

@ -1,163 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm confirm-control-speed"
:title="title"
:visible.sync="show"
width="540px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
append-to-body
>
<div style="height: 60px; padding-left: 20px">
<span style="font-size: 18px">{{ message }}</span>
</div>
<el-row justify="center" class="button-group">
<el-col :span="6" :offset="6">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="10" :offset="2">
<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: 'ConfirmControlSpeed',
data() {
return {
dialogShow: false,
loading: false,
type: '',
operation: '',
message: ''
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
if (this.dialogShow) {
if (this.operation === OperationEvent.Section.setSpeed.order.operation) {
return '区段设置限速';
} else if (this.operation === OperationEvent.Section.cancelSpeed.order.operation) {
return '区段取消限速';
} else if (this.operation === OperationEvent.Switch.setSpeed.order.operation) {
return '道岔设置限速';
} else if (this.operation === OperationEvent.Switch.cancelSpeed.order.operation) {
return '道岔取消限速';
}
}
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
if (this.dialogShow) {
if (this.operation === OperationEvent.Section.setSpeed.order.operation) {
/** 区段设置限速*/
return OperationEvent.Section.setSpeed.confirm.domId;
} else if (this.operation === OperationEvent.Section.cancelSpeed.order.operation) {
/** 区段取消限速*/
return OperationEvent.Section.cancelSpeed.confirm.domId;
} else if (this.operation === OperationEvent.Switch.setSpeed.order.operation) {
/** 道岔设置限速*/
return OperationEvent.Switch.setSpeed.confirm.domId;
} else if (this.operation === OperationEvent.Switch.cancelSpeed.order.operation) {
/** 道岔取消限速*/
return OperationEvent.Switch.cancelSpeed.confirm.domId;
}
}
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate) {
if (!this.dialogShow) {
this.type = operate.type;
this.operation = operate.operation;
this.message = operate.message;
}
this.loading = false;
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
const operate = {
type: this.type
};
if (this.operation === OperationEvent.Section.setSpeed.order.operation) {
/** 区段设置限速*/
operate.operation = OperationEvent.Section.setSpeed.confirm.operation;
} else if (this.operation === OperationEvent.Section.cancelSpeed.order.operation) {
/** 区段取消限速*/
operate.operation = OperationEvent.Section.cancelSpeed.confirm.operation;
} else if (this.operation === OperationEvent.Switch.setSpeed.order.operation) {
/** 道岔设置限速*/
operate.operation = OperationEvent.Switch.setSpeed.confirm.operation;
} else if (this.operation === OperationEvent.Switch.cancelSpeed.order.operation) {
/** 道岔取消限速*/
operate.operation = OperationEvent.Switch.cancelSpeed.confirm.operation;
}
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {
this.$emit('setOperate', { step: 1, success: true });
this.doClose();
}
}).catch((error) => {
this.loading = false;
this.$emit('setOperate', { step: 0, success: false });
this.doClose();
});
},
cancel() {
const operate = {
type: this.type,
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {
this.$emit('setOperate', { step: 0, success: false });
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.doClose();
}
}).catch(error => {
this.doClose();
});
}
}
};
</script>
<style>
.confirm-control-speed .context {
padding-bottom: 40px !important;
border: 1px solid lightgray;
}
</style>

View File

@ -1,78 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm confirm-control-speed"
:title="title"
:visible.sync="show"
width="340px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
append-to-body
>
<div style="height: 60px; padding-left: 20px">
<span style="font-size: 18px">{{ message }}</span>
</div>
<el-row justify="center" class="button-group">
<el-col :span="11">
<el-button :id="confirmId" type="primary" @click="confirm">确定</el-button>
</el-col>
<el-col :span="11" :offset="2">
<el-button @click="doClose"> </el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'ConfirmTip',
data() {
return {
dialogShow: false,
message: '',
confirmId: ''
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
if (this.dialogShow) {
return '提示';
}
}
},
mounted() {
},
methods: {
doShow(operate) {
this.message = operate.message;
this.dialogShow = true;
this.confirmId = operate.confirmId;
},
confirm() {
this.$emit('close');
},
doClose() {
this.dialogShow = false;
}
}
};
</script>
<style scoped>
.confirm-control-speed .context {
padding-bottom: 40px !important;
border: 1px solid lightgray;
}
.chengdou-03__systerm .el-dialog .el-button{
display: block;
margin: 0 auto;
}
</style>

View File

@ -1,168 +0,0 @@
<template>
<el-dialog class="chengdou-03__systerm confirm-control" :title="title" :visible.sync="show" width="360px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
<div class="context">
<template v-for="message in messages">
<span>{{message}}</span>
</template>
</div>
<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="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo"></notice-info>
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from './childDialog/noticeInfo'
export default {
name: 'ConfirmTrain',
data() {
return {
dialogShow: false,
loading: false,
operate: {},
messages: '',
operation: null
}
},
components: {
NoticeInfo
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
if (this.operation === OperationEvent.Train.addTrainId.menu.operation) {
return '添加列车识别号';
} else if (this.operation === OperationEvent.Train.editTrainId.menu.operation) {
return '修改列车识别号';
} else if (this.operation === OperationEvent.Train.delTrainId.menu.operation) {
return '删除列车识别号';
} else if (this.operation === OperationEvent.Train.moveTrainId.menu.operation) {
return '移动列车识别号';
} else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) {
return '交换列车识别号';
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
return '修改车组号'
}
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
if (this.dialogShow) {
if (this.operation === OperationEvent.Train.addTrainId.menu.operation) {
/** 添加列车识别号*/
return OperationEvent.Train.addTrainId.confirm.domId
} else if (this.operation === OperationEvent.Train.editTrainId.menu.operation) {
/** 修改列车识别号*/
return OperationEvent.Train.editTrainId.confirm.domId
} else if (this.operation === OperationEvent.Train.delTrainId.menu.operation) {
/** 删除列车识别号*/
return OperationEvent.Train.delTrainId.confirm.domId
} else if (this.operation === OperationEvent.Train.moveTrainId.menu.operation) {
/** 移动列车识别号*/
return OperationEvent.Train.moveTrainId.confirm.domId
} else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) {
/** 交换列车识别号*/
return OperationEvent.Train.switchTrainId.confirm.domId
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
/** 修改车组号*/
return OperationEvent.Train.editTrainNo.confirm.domId
}
}
},
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate) {
if (!this.dialogShow) {
this.loading = false;
this.operate = operate || {};
this.messages = operate.messages;
this.operation = operate.operation;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('map/setTrainWindowShow', false);
this.$store.dispatch('training/emitTipFresh');
},
commit() {
if (this.operation === OperationEvent.Train.addTrainId.menu.operation) {
this.routeSetting();
} else if (this.operation === OperationEvent.Train.editTrainId.menu.operation) {
this.routeSetting();
} else if (this.operation === OperationEvent.Train.delTrainId.menu.operation) {
this.routeSetting();
} else if (this.operation === OperationEvent.Train.moveTrainId.menu.operation) {
this.routeSetting();
} else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) {
this.routeSetting();
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
this.routeSetting();
}
},
//
routeSetting() {
let operate = {
send: true,
type: this.operate.type,
operation: OperationEvent.Train.addTrainId.confirm.operation,
}
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
})
},
cancel() {
let operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => {
this.doClose();
});
}
}
}
</script>
<style>
.confirm-control .context {
padding-bottom: 40px !important;
border: 1px solid lightgray;
}
</style>

View File

@ -1,197 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm"
:visible.sync="show"
width="360px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
append-to-body
>
<el-row>
<el-col :span="22" :offset="1">
<el-input v-model="encryptionPassword" placeholder="请使用软键盘输入" size="medium" :disabled="true" />
</el-col>
</el-row>
<el-row v-if="showMistake">
<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="4" :offset="1">
<el-button @click="inputNum">7</el-button>
</el-col>
<el-col :span="4" :offset="4">
<el-button @click="inputNum">8</el-button>
</el-col>
<el-col :span="4" :offset="4">
<el-button @click="inputNum">9</el-button>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="4" :offset="1">
<el-button @click="inputNum">4</el-button>
</el-col>
<el-col :span="4" :offset="4">
<el-button @click="inputNum">5</el-button>
</el-col>
<el-col :span="4" :offset="4">
<el-button @click="inputNum">6</el-button>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="4" :offset="1">
<el-button @click="inputNum">1</el-button>
</el-col>
<el-col :span="4" :offset="4">
<el-button @click="inputNum">2</el-button>
</el-col>
<el-col :span="4" :offset="4">
<el-button @click="inputNum">3</el-button>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="4" :offset="1">
<el-button @click="inputNum">0</el-button>
</el-col>
<el-col :span="4" :offset="4">
<el-button @click="inputClear">C</el-button>
</el-col>
<el-col :span="4" :offset="4">
<el-button @click="backSpace"> &lt; </el-button>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="4" :offset="1">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="4" :offset="12">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'PasswordBox',
data() {
return {
/* 写死的初始密码*/
correctPassword: '123456',
dialogShow: false,
operation: null,
checkHasInput: false,
/* 输入值*/
passwordCheck: '',
/* 输入值替换为对应长度的星号*/
encryptionPassword: '',
loading: false,
showMistake: false
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel: {
get: function () {
return this.dialogShow ? OperationEvent.Command.close.password.domId : '';
},
set: function () {
}
},
domIdConfirm() {
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operate.operateNext) : '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate) {
this.operate = operate || {};
this.dialogShow = true;
this.checkHasInput = false;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.showMistake = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() { //
if (this.passwordCheck === this.correctPassword) {
this.$emit('checkOver', this.operate);
this.doClose();
this.inputClear();
} else {
this.showMistake = true;
}
},
/* 软键盘输入*/
inputNum(e) {
this.showMistake = false;
this.passwordCheck += e.path[0].innerText;
this.encryptionPassword = this.passwordCheck.replace(/./g, '*');
},
/* 软键盘清除*/
inputClear() {
this.showMistake = false;
this.passwordCheck = '';
this.encryptionPassword = '';
},
/* 软键盘回退*/
backSpace() {
this.showMistake = false;
const password = this.passwordCheck;
if (password !== '') {
this.passwordCheck = password.substring(0, password.length - 1);
this.encryptionPassword = this.passwordCheck;
}
},
cancel() {
const operate = {
send: false,
type: this.operate.type,
operation: OperationEvent.Command.close.password.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
this.inputClear();
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch(() => {
this.loading = false;
this.$refs.noticeInfo && this.$refs.noticeInfo.doShow(operate);
});
}
}
};
</script>
<style>
.notice-info .context {
padding-bottom: 40px !important;
border: 1px solid lightgray;
}
.password-error {
color: red;
}
</style>

View File

@ -1,100 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm popup-alarm"
:title="title"
:visible.sync="show"
width="500px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
append-to-body
>
<el-row>
<el-col :offset="2">
<span v-for="message in messages">{{ message }}</span><br>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="8">
<el-button :id="domIdSure" type="primary" @click="commit">确定</el-button>
</el-col>
</el-row>
</span>
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'PopupAlarm',
data() {
return {
dialogShow: false,
messages: [],
operate: null,
operation: ''
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
return '弹出式告警';
},
domIdSure() {
return this.dialogShow ? OperationEvent.Command.close.alarm.domId : '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate, messages) {
this.operate = operate || {};
this.operation = operate.operation;
this.dialogShow = true;
this.messages = messages || [];
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
//
this.alxeEffective();
}
},
alxeEffective() {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.close.alarm.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.doClose();
}
});
}
}
};
</script>
<style>
.popup-alarm .context {
padding-bottom: 40px !important;
border: 1px solid lightgray;
}
</style>

View File

@ -1,7 +1,7 @@
<template> <template>
<el-dialog <el-dialog
v-dialogDrag v-dialogDrag
class="chengdou-03__systerm stand-stop-time" class="chengdou-01__systerm stand-stop-time"
:title="title" :title="title"
:visible.sync="show" :visible.sync="show"
width="900px" width="900px"
@ -9,10 +9,10 @@
:z-index="2000" :z-index="2000"
:modal="false" :modal="false"
:close-on-click-modal="false" :close-on-click-modal="false"
center
> >
<hr style="height:1px;border:none;border-top:1px solid #555555;width: 900px;position: absolute; top: 80px; left: 0">
<el-form ref="form" size="small" label-width="50px" :model="addModel" :rules="rules"> <el-form ref="form" size="small" label-width="50px" :model="addModel" :rules="rules">
<el-row> <el-row style="margin-bottom: 0; height: 40px">
<el-col :span="3"> <el-col :span="3">
<el-form-item label="Number" prop="number"> <el-form-item label="Number" prop="number">
<el-input v-model="addModel.number" style="width: 50px;" /> <el-input v-model="addModel.number" style="width: 50px;" />
@ -34,6 +34,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<hr style="height:1px;border:none;border-top:1px solid #406B6C;width: 892px;position: absolute; left: 3px;margin-top: 0">
<el-row style="margin-top: 20px"> <el-row style="margin-top: 20px">
<el-col :span="5"> <el-col :span="5">
<el-form-item label="Tag" prop="tag"> <el-form-item label="Tag" prop="tag">
@ -51,7 +52,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="13"> <el-col :span="13">
<div style=" border: 1px double lightgray; height: 32px;"> <div style="border-width: 1px; border-style:double;border-color: #335658 #99C1C3 #99C1C3 #335658; height: 32px;">
<span class="base-label">Inhibits</span> <span class="base-label">Inhibits</span>
<el-form-item prop="inhibits" style="top: 0;position:absolute;"> <el-form-item prop="inhibits" style="top: 0;position:absolute;">
<el-checkbox-group v-model="addModel.inhibits"> <el-checkbox-group v-model="addModel.inhibits">
@ -253,12 +254,12 @@ export default {
}; };
</script> </script>
<style scoped> <style scoped>
.chengdou-03__systerm .el-dialog .base-label { .chengdou-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x); background: #5F9EA0;
position: relative; position: relative;
left: -5px; left: 15px;
top: -18px; top: -10px;
padding: 0 5px; padding: 0 5px;
background-color: #F0F0F0; color: #000;
} }
</style> </style>

View File

@ -1,7 +1,7 @@
<template> <template>
<el-dialog <el-dialog
v-dialogDrag v-dialogDrag
class="chengdou-03__systerm stand-stop-time" class="chengdou-01__systerm stand-stop-time"
:title="title" :title="title"
:visible.sync="show" :visible.sync="show"
width="700px" width="700px"
@ -138,7 +138,7 @@ export default {
commit() { commit() {
this.$refs['form'].validate((valid) => { this.$refs['form'].validate((valid) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/pushRequestList', {device: this.selected, operation: '设置站台停站时间'}); this.$store.dispatch('menuOperation/pushRequestList', {device: this.selected, operation:{ code: OperationEvent.StationStand.setStopTime.menu.operation, name: '设置站台停站时间'}});
} }
// if (valid) { // if (valid) {
// const operate = { // const operate = {

View File

@ -1,284 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm signal-control"
:title="title"
:visible.sync="show"
width="440px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row>
<el-col :span="2"><span>车站</span></el-col>
<el-col :span="6">
<el-input v-model="stationName" size="small" disabled />
</el-col>
<el-col :span="5" :offset="1"><span>始端信号机</span></el-col>
<el-col :span="6">
<el-input v-model="signalName" size="small" disabled />
</el-col>
</el-row>
<el-row justify="center" style="margin-top: 50px">
<el-col :span="11" :offset="13">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<confirm-control ref="confirmControl" />
<password-box ref="password" @checkOver="passWordCommit" />
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
import CancelMouseState from '@/mixin/CancelMouseState';
import ConfirmControl from './childDialog/confirmControl';
import PasswordBox from './childDialog/passwordInputBox';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'RouteControl',
components: {
ConfirmControl,
PasswordBox,
NoticeInfo
},
mixins: [
CancelMouseState
],
data() {
return {
dialogShow: false,
loading: false,
selected: null,
tempdata: [],
operation: null,
stationName: '',
signalName: '',
operateCode: ''
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.close.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
},
title() {
if (this.operation == OperationEvent.Signal.cancelTrainRoute.menu.operation) {
return '取消列车进路';
} else if (this.operation == OperationEvent.Signal.humanTrainRoute.menu.operation) {
return '总人解';
} else if (this.operation == OperationEvent.Signal.reopenSignal.menu.operation) {
return '重开信号';
} else if (this.operation == OperationEvent.Signal.lock.menu.operation) {
return '信号封锁';
} else if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
return '信号解封';
} else if (this.operation == OperationEvent.Signal.signalClose.menu.operation) {
return '信号关灯';
}
return '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate, selected, tempdata) {
this.selected = selected;
this.tempdata = tempdata;
if (!this.dialogShow) {
this.signalName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
this.signalName = selected.name;
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
this.operation = operate.operation;
this.operateCode = operate.code;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
if (this.operation == OperationEvent.Signal.cancelTrainRoute.menu.operation) {
/** 取消列车进路*/
this.cancelTrainRoute();
} else if (this.operation == OperationEvent.Signal.humanTrainRoute.menu.operation) {
/** 总人解*/
this.humanTrainRoute();
} else if (this.operation == OperationEvent.Signal.reopenSignal.menu.operation) {
/** 信号重开*/
this.reopenSignal();
} else if (this.operation == OperationEvent.Signal.lock.menu.operation) {
/** 信号封锁*/
this.lock();
} else if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/
this.unlock();
} else if (this.operation == OperationEvent.Signal.signalClose.menu.operation) {
/** 信号关灯*/
this.signalClose();
}
},
passWordCommit(data) {
const operate = {
over: true,
operation: data.operateNext,
cmdType: data.cmdType
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { this.doClose(); }
}).catch(() => {
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
cancelTrainRoute() {
const operate = {
over: true,
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({valid}) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
humanTrainRoute() {
const operate = {
operation: OperationEvent.Signal.humanTrainRoute.menu.operation,
operateNext: OperationEvent.Signal.humanTrainRoute.confirm.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
operate.cmdType = CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE;
this.$refs.password.doShow(operate);
}
}).catch(() => {
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
reopenSignal() {
const operate = {
over: true,
operation: OperationEvent.Signal.reopenSignal.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
lock() {
const operate = {
operation: OperationEvent.Signal.lock.menu.operation,
operateNext: OperationEvent.Signal.lock.confirm.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
operate.cmdType = CMD.Signal.CMD_SIGNAL_BLOCK;
this.$refs.password.doShow(operate);
}
}).catch(() => {
});
},
//
unlock() {
const operate = {
operation: OperationEvent.Signal.unlock.menu.operation,
operateNext: OperationEvent.Signal.unlock.confirm.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
operate.cmdType = CMD.Signal.CMD_SIGNAL_UNBLOCK;
this.$refs.password.doShow(operate);
}
}).catch(() => {
});
},
//
signalClose() {
const operate = {
operation: OperationEvent.Signal.signalClose.menu.operation,
messages: [`信号关灯: ${this.signalName}`]
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.confirmControl.doShow(operate);
}
}).catch(() => {
this.loading = false;
});
},
//
cancel() {
const operate = {
operation: OperationEvent.Command.close.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
}
}
};
</script>

View File

@ -1,156 +0,0 @@
<template>
<div>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm route-detail"
:title="title"
:visible.sync="show"
width="460px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row>
<el-col :span="2"><span>车站</span></el-col>
<el-col :span="6">
<el-input v-model="stationName" size="small" disabled />
</el-col>
<el-col :span="6" :offset="1"><span>始端信号机</span></el-col>
<el-col :span="6">
<el-input v-model="signalName" size="small" disabled />
</el-col>
</el-row>
<div style="margin-top: 20px">
<el-table
ref="tempTable"
:data="tempData"
border
style="width: 100%"
size="mini"
highlight-current-row
:height="140"
>
<el-table-column type="index" label="Id" width="40" />
<el-table-column label="描述" width="140">
<template slot-scope="scope">
<span>{{ scope.row.name }}</span>
</template>
</el-table-column>
<el-table-column label="方向" width="60">
<template slot-scope="scope">
<span>{{ scope.row.name }}</span>
</template>
</el-table-column>
<el-table-column label="完整性">
<template slot-scope="scope">
<span>{{ scope.row.name }}</span>
</template>
</el-table-column>
<el-table-column prop="status" label="控制">
<template slot-scope="scope">
<span v-if="scope.row.controlType == '01'">自动</span>
<span v-else>人工</span>
</template>
</el-table-column>
</el-table>
</div>
<el-row justify="center" class="button-group">
<el-col :span="5" :offset="19">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
</el-dialog>
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import CancelMouseState from '@/mixin/CancelMouseState';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
export default {
name: 'RouteDetail',
components: {
NoticeInfo
},
mixins: [
CancelMouseState
],
data() {
return {
dialogShow: false,
loading: false,
selected: null,
tempData: [],
stationName: '',
signalName: ''
};
},
computed: {
...mapGetters('map', [
'signalList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Signal.detail.menu.domId : '';
},
title() {
return '查询进路状态';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate, selected, tempData) {
this.selected = selected;
//
if (!this.dialogShow) {
this.signalName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
this.signalName = selected.name;
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
this.tempData = tempData || [];
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
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>

View File

@ -1,272 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm route-setting"
:title="title"
:visible.sync="show"
width="460px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row>
<el-col :span="2"><span class="item-lable">车站</span></el-col>
<el-col :span="6">
<el-input v-model="stationName" size="small" disabled />
</el-col>
<el-col :span="4" :offset="1"><span class="item-lable">始端信号机</span></el-col>
<el-col :span="6">
<el-input v-model="signalName" size="small" disabled />
</el-col>
</el-row>
<div class="route-table-box">
<span class="route-table-tip">进路列表</span>
<el-table ref="table" :data="tempData" border :cell-style="tableStyle" style="width: 99%;" size="mini" height="90" highlight-current-row @row-click="clickEvent">
<el-table-column :id="domIdChoose" prop="name" label="进路" style="margin-left:30px" />
<el-table-column :id="domIdChoose" prop="controlType" label="进路属性" style="margin-left:30px">
<template slot-scope="scope">{{ controlTypeNameMap[scope.row.controlType] }} </template>
</el-table-column>
<el-table-column :id="domIdChoose" prop="controlType" label="进路描述" style="margin-left:30px">
<template></template>
</el-table-column>
</el-table>
</div>
<el-row justify="center" style="margin-top: 40px">
<el-col :span="12" :offset="12">
<el-button
:id="domIdConfirm"
type="primary"
:loading="loading"
:disabled="commitDisabled"
@click="commit"
>执行</el-button>
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
<password-box ref="passwordBox" @checkOver="passWordCommit" />
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import CancelMouseState from '@/mixin/CancelMouseState';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
import PasswordBox from './childDialog/passwordInputBox.vue';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'RouteSelection',
components: {
NoticeInfo,
PasswordBox
},
mixins: [
CancelMouseState
],
data() {
return {
tempData: [],
beforeSectionList: [],
dialogShow: false,
loading: false,
selected: null,
operation: '',
display: true,
stationName: '',
signalName: '',
tableStyle: {
'border-bottom': 'none'
},
controlTypeNameMap: {
'01': '折返',
'02': '直通'
},
row: ''
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdChoose() {
return this.dialogShow ? OperationEvent.Signal.guide.choose.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Signal.guide.menu.domId : '';
},
title() {
return '办理引导进路';
},
commitDisabled() {
let disabled = true;
if (this.row) {
disabled = !this.row.canSetting;
}
return disabled;
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
getProtectedSectionName(row) {
let name = '';
if (row &&
row.overlapSectionList &&
row.overlapSectionList &&
row.overlapSectionList.length > 0) {
const protect = row.overlapSectionList[0];
name = `${protect.name}`;
const station = this.$store.getters['map/getDeviceByCode'](protect.stationCode);
if (station) {
name = `${name}(${station.name})`;
}
}
return name;
},
doShow(operate, selected, tempData) {
this.selected = selected;
//
if (!this.dialogShow) {
this.signalName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
this.signalName = selected.name;
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
this.tempData = tempData || [];
this.operation = operate.operation;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
passWordCommit(data) {
const operate = {
over: true,
operation: data.operateNext,
cmdType: data.cmdType,
val: data.val,
param: data.param
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$refs.table.setCurrentRow();
this.$store.dispatch('training/emitTipFresh');
},
clickEvent(row, event, column) {
this.computedCommitDisabled(row);
this.row = row;
if (row) {
const operate = {
operation: OperationEvent.Signal.guide.choose.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
}
},
//
commit() {
if (this.row && this.row.canSetting) {
const operate = {
operation: OperationEvent.Signal.guide.menu.operation,
operateNext: OperationEvent.Signal.guide.confirm.operation
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
operate.cmdType = CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE;
operate.val = this.row.code;
operate.param = {
Route_Code: this.row.code
};
this.$refs.passwordBox.doShow(operate);
} else {
this.doClose();
this.$refs.noticeInfo.doShow(operate);
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
}
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
},
computedCommitDisabled(row) {
this.commitDisabled = !row.canSetting;
}
}
};
</script>
<style scoped>
.route-table-tip {
position: relative !important;
color: #3C72DF !important;
background: #ECE9D8 !important;
font-size: 12px;
top: -7px;
left: 7px;
}
.route-table-box {
margin-top: 20px !important;
line-height: 10px !important;
border: 2px solid #FFFFFF !important;
border-radius: 5px !important;
z-index: 1;
padding-bottom: 40px;
}
.item-lable {
line-height: 26px !important;
font-size: 13px;
}
</style>

View File

@ -1,285 +0,0 @@
<template>
<div>
<el-dialog v-dialogDrag class="chengdou-03__systerm route-hand-control" :title="title" :visible.sync="show" width="500px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<el-row class="header">
<el-col :span="11"><span>车站</span></el-col>
<el-col :span="11" :offset="2"><span>始端信号机</span></el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-input v-model="stationName" size="small" disabled />
</el-col>
<el-col :span="11" :offset="2">
<el-input v-model="signalName" size="small" disabled />
</el-col>
</el-row>
<div class="table">
<el-table ref="tempTable" :data="tempData" border style="width: 100%" size="mini" :highlight-current-row="highlight" :height="140" @row-click="clickEvent">
<el-table-column :id="domIdChoose" prop="name" width="155" label="描述" style="margin-left:30px">
<template slot-scope="scope">
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.name }}</span>
</template>
</el-table-column>
<el-table-column :id="domIdChoose" prop="name" label="方向" style="">
<template slot-scope="scope">
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">111</span>
</template>
</el-table-column>
<el-table-column :id="domIdChoose" prop="name" label="属性" style="">
<template slot-scope="scope">
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">1111</span>
</template>
</el-table-column>
<el-table-column :id="domIdChoose" prop="name" label="控制" style="">
<template slot-scope="scope">
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.controlType == '01' ? '自动' : '人工' }}</span>
</template>
</el-table-column>
</el-table>
</div>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :disabled="commitDisabled" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<confirm-control ref="confirmControl" />
<notice-info ref="noticeInfo" />
</el-dialog>
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
import ConfirmControl from './childDialog/confirmControl';
import CancelMouseState from '@/mixin/CancelMouseState';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'RouteHandControl',
components: {
ConfirmControl,
NoticeInfo
},
mixins: [
CancelMouseState
],
data() {
return {
dialogShow: false,
loading: false,
selected: null,
tempData: [],
operation: null,
selection: [],
stationName: '',
signalName: '',
allSelect: false,
highlight: true,
row: ''
};
},
computed: {
...mapGetters('map', [
'signalList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdChoose() {
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
return OperationEvent.Signal.humanControl.choose.domId;
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
return OperationEvent.Signal.atsAutoControl.choose.domId;
}
return '';
},
domIdConfirm() {
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
},
title() {
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
return '进路交人工控';
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
return '进路交自动控';
}
return '';
},
commitDisabled() {
let disabled = true;
if (this.selection && this.selection.length) {
disabled = false;
}
return disabled;
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate, selected, tempData) {
this.selected = selected;
//
if (!this.dialogShow) {
this.signalName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
this.signalName = selected.name;
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
if (tempData && tempData.length > 0) {
tempData.forEach(elem => {
elem.check = false;
elem.disabled = false;
//
if (operate.operation === OperationEvent.Signal.humanControl.menu.operation && elem.controlType == '01') {
elem.disabled = true;
} if (operate.operation === OperationEvent.Signal.atsAutoControl.menu.operation && elem.controlType == '02') {
elem.disabled = true;
}
});
}
this.tempData = tempData || [];
this.operation = operate.operation;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$refs.tempTable.setCurrentRow();
this.$store.dispatch('training/emitTipFresh');
},
allSelectChange() {
if (this.allSelect) {
this.tempData.forEach(item => {
if (!item.disabled) {
item.check = true;
}
});
} else {
this.tempData.forEach(item => {
if (!item.disabled) {
item.check = false;
}
});
}
},
clickEvent(row, event, column) {
this.highlight = false;
if (row && !row.disabled) {
this.highlight = true;
this.selection = [row];
this.beforeSectionList = row.containSectionList || [];
this.row = row;
//
const operate = {
operation: ''
};
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
/** 进路交人工控*/
operate.operation = OperationEvent.Signal.humanControl.choose.operation;
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
/** 进路交自动控*/
operate.operation = OperationEvent.Signal.atsAutoControl.choose.operation;
}
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
}
},
commit() {
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
/** 进路交人工控*/
this.humanControl();
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
/** 进路交自动控*/
this.atsAutoControl();
}
},
//
humanControl() {
const operate = {
over: true,
operation: OperationEvent.Signal.humanControl.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING,
val: this.row.code,
param: {
Route_Code: this.row.code
}
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
atsAutoControl() {
const operate = {
over: true,
operation: OperationEvent.Signal.atsAutoControl.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING,
val: this.row.code,
param: {
Route_Code: this.row.code
}
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
cancel() {
const operate = {
over: true,
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); });
}
}
};
</script>

View File

@ -1,276 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm route-setting"
:title="title"
:visible.sync="show"
width="460px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row>
<el-col :span="2"><span class="item-lable">车站</span></el-col>
<el-col :span="6">
<el-input v-model="stationName" size="small" disabled />
</el-col>
<el-col :span="4" :offset="1"><span class="item-lable">始端信号机</span></el-col>
<el-col :span="6">
<el-input v-model="signalName" size="small" disabled />
</el-col>
</el-row>
<div class="route-table-box">
<span class="route-table-tip">进路列表</span>
<el-table
ref="table"
:data="tempData"
border
:cell-style="tableStyle"
style="width: 99%;"
size="mini"
height="150"
highlight-current-row
@row-click="clickEvent"
>
<el-table-column :id="domIdChoose" prop="name" label="进路" style="margin-left:30px" />
<el-table-column :id="domIdChoose" prop="controlType" label="进路属性" style="margin-left:30px">
<template slot-scope="scope">
{{ controlTypeNameMap[scope.row.controlType] }}
</template>
</el-table-column>
<el-table-column :id="domIdChoose" prop="controlType" label="进路描述" style="margin-left:30px">
<template></template>
</el-table-column>
</el-table>
</div>
<el-row justify="center" style="margin-top: 70px">
<el-col :span="12" :offset="12">
<el-button
:id="domIdConfirm"
type="primary"
:loading="loading"
:disabled="commitDisabled"
@click="commit"
>执行</el-button>
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import CancelMouseState from '@/mixin/CancelMouseState';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'RouteSelection',
components: {
NoticeInfo
},
mixins: [
CancelMouseState
],
data() {
return {
tempData: [],
beforeSectionList: [],
dialogShow: false,
loading: false,
selected: null,
row: null,
operation: '',
display: true,
stationName: '',
signalName: '',
tableStyle: {
'border-bottom': 'none'
},
controlTypeNameMap: {
'01': '折返',
'02': '直通'
}
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdChoose() {
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.choose.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menu.domId : '';
},
title() {
return '办理进路';
},
commitDisabled() {
let disabled = true;
if (this.row) {
disabled = !this.row.canSetting;
}
return disabled;
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
getProtectedSectionName(row) {
let name = '';
if (row &&
row.overlapSectionList &&
row.overlapSectionList &&
row.overlapSectionList.length > 0) {
const protect = row.overlapSectionList[0];
name = `${protect.name}`;
const station = this.$store.getters['map/getDeviceByCode'](protect.stationCode);
if (station) {
name = `${name}(${station.name})`;
}
}
return name;
},
doShow(operate, selected, tempData) {
this.selected = selected;
//
if (!this.dialogShow) {
this.signalName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
this.signalName = selected.name;
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
this.tempData = tempData || [];
this.operation = operate.operation;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.restoreBeforeDevices();
this.$refs.table.setCurrentRow();
this.$store.dispatch('training/emitTipFresh');
},
restoreBeforeDevices() {
//
if (this.beforeSectionList && this.beforeSectionList.length) {
this.beforeSectionList.forEach(elem => {
elem.cutOff = false;
});
}
this.$store.dispatch('training/updateMapState', [...this.beforeSectionList]);
this.beforeSectionList = [];
},
clickEvent(row, event, column) {
this.row = row;
if (row) {
//
this.restoreBeforeDevices();
row.canSetting = true;
//
if (row.containSectionList && row.containSectionList.length) {
//
row.containSectionList.forEach(elem => {
elem.cutOff = true;
});
}
this.$store.dispatch('training/updateMapState', [...row.containSectionList]);
this.beforeSectionList = row.containSectionList || [];
//
const operate = {
operation: OperationEvent.Signal.arrangementRoute.choose.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
}
},
commit() {
if (this.row && this.row.canSetting) {
const operate = {
over: true,
operation: OperationEvent.Signal.arrangementRoute.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE,
val: this.row.code,
param: {
Route_Code: this.row.code
}
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
}
},
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>
<style scoped>
.route-table-tip {
position: relative !important;
color: #3C72DF !important;
background: #ECE9D8 !important;
font-size: 12px;
top: -7px;
left: 7px;
}
.route-table-box {
margin-top: 15px !important;
line-height: 10px !important;
border: 2px solid #FFFFFF !important;
border-radius: 5px !important;
z-index: 1;
}
.item-lable {
line-height: 26px !important;
font-size: 13px;
}
</style>

View File

@ -1,167 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm section-control"
:title="title"
:visible.sync="show"
width="440px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row>
<el-col :span="3"><span>车站</span></el-col>
<el-col :span="6">
<el-input v-model="stationName" size="small" disabled />
</el-col>
<el-col :span="3" :offset="2"><span>区段</span></el-col>
<el-col :span="6">
<el-input v-model="sectionName" size="small" disabled />
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="11" :offset="13">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
<password-box ref="passwordBox" @checkOver="passWordCommit" />
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
import PasswordBox from './childDialog/passwordInputBox';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'SectionControl',
components: {
NoticeInfo,
PasswordBox
},
data() {
return {
dialogShow: false,
loading: false,
selected: null,
operation: '',
stationName: '',
sectionName: ''
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
},
title() {
if (this.operation == OperationEvent.Section.fault.menu.operation) {
return '区故解';
}
return '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate, selected) {
this.selected = selected;
if (!this.dialogShow) {
this.sectionName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
if (selected.type === '02') {
const section = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
if (section) {
this.sectionName += section.name;
}
}
this.sectionName += selected.name;
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
this.operation = operate.operation || '';
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
if (this.operation == OperationEvent.Section.fault.menu.operation) {
/** 区故解*/
this.fault();
}
},
passWordCommit(data) {
const operate = {
over: true,
operation: data.operateNext,
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
fault() {
const operate = {
operation: OperationEvent.Section.fault.menu.operation,
operateNext: OperationEvent.Section.fault.confirm.operation
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.passwordBox.doShow(operate);
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
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>

View File

@ -1,121 +0,0 @@
<template>
<div>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm section-detail"
:title="title"
:visible.sync="show"
width="320px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-form ref="form" label-position="left" :model="formModel" label-width="100px">
<el-form-item label="区段名称">
<el-input v-model="formModel.sectionName" disabled />
</el-form-item>
<el-form-item label="车站名称">
<el-input v-model="formModel.stationName" disabled />
</el-form-item>
<el-form-item label="公里标(Km)">
<el-input v-model="formModel.kmPost" disabled />
</el-form-item>
<el-form-item label="长度(Km)">
<el-input v-model="formModel.factLength" disabled />
</el-form-item>
</el-form>
<el-row justify="center" style="margin-top: 50px">
<el-col :span="7" :offset="17">
<el-button :id="domIdConfirm" @click="commit">确定</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
</el-dialog>
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
export default {
name: 'RouteDetail',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
selected: null,
formModel: {
sectionName: '',
stationName: '',
kmPost: '',
factLength: ''
}
};
},
computed: {
...mapGetters('map', [
'signalList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Section.detail.menu.domId : '';
},
title() {
return '无岔区段属性对话框';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate, selected) {
this.selected = selected;
//
if (!this.dialogShow) {
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
this.formModel.sectionName = selected.name;
this.formModel.factLength = '';
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.formModel.stationName = station.name;
this.formModel.kmPost = station.kmPost;
}
}
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
const operate = {
operation: OperationEvent.Section.detail.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => {
this.doClose();
});
}
}
};
</script>

View File

@ -1,7 +1,7 @@
<template> <template>
<el-dialog <el-dialog
v-dialogDrag v-dialogDrag
class="chengdou-03__systerm stand-stop-time" class="chengdou-01__systerm stand-stop-time"
:title="title" :title="title"
:visible.sync="show" :visible.sync="show"
width="1000px" width="1000px"
@ -208,7 +208,7 @@ export default {
commit() { commit() {
this.$refs['form'].validate((valid) => { this.$refs['form'].validate((valid) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/pushRequestList', {device: this.selected, Operation: '速度控制'}); this.$store.dispatch('menuOperation/pushRequestList', {device: this.selected, Operation: {code:OperationEvent.Section.setSpeed.menu.operation, name:'速度控制'}});
} }
}); });
// this.$refs['form'].validate((valid) => { // this.$refs['form'].validate((valid) => {
@ -253,12 +253,4 @@ export default {
}; };
</script> </script>
<style scoped> <style scoped>
.chengdou-03__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -18px;
padding: 0 5px;
background-color: #F0F0F0;
}
</style> </style>

View File

@ -1,735 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm stand-detain-train"
:title="title"
:visible.sync="show"
width="400px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row class="header">
<el-col :span="11">
<span>车站</span>
<el-input v-model="stationName" style="width: 110px; margin-left: 10px;" size="small" disabled />
</el-col>
<el-col :span="11" :offset="1">
<span>站台</span>
<el-input v-model="standName" style="width: 110px; margin-left: 10px;" size="small" disabled />
</el-col>
</el-row>
<div v-if="DetainTrain">
<div
style="padding: 15px; margin-bottom: 25px; margin-top: 20px; border: 1px solid lightgray; height: 90px;"
>
<span class="base-label" style="left: -5px; top: -22px; background: #ECE9D8; padding: 0 4px;">范围</span>
<el-row style="margin-top: -13px;">
<el-radio-group :id="domIdDetainCar" v-model="radio" @change="choose">
<el-col :span="24">
<el-radio
label="01"
style="display: block; text-align: left; float: left; margin-right: 10px;"
>本站台
</el-radio>
<el-radio
v-if="radio1 == 2"
label="02"
style="display: block; text-align: left; float: left; margin-right: 10px;"
>上行全线
</el-radio>
<el-radio
v-if="radio1 == 2"
label="03"
style="display: block; text-align: left; float: left;"
>下行全线</el-radio>
</el-col>
</el-radio-group>
</el-row>
</div>
<div style="padding: 15px; margin-top: 20px; border: 1px solid lightgray;">
<span class="base-label" style="left: -5px; top: -22px; background: #ECE9D8; padding: 0 4px;">功能</span>
<el-row style="margin-top: -13px;">
<el-col :span="11">
<el-radio
v-model="radio1"
label="1"
:disabled="radio1 == '2'"
style="display: block; text-align: left;"
>
扣车</el-radio>
</el-col>
<el-col :span="11" :offset="2">
<el-radio
v-model="radio1"
label="2"
:disabled="radio1 == '1'"
style="display: block; text-align: left;"
>
取消扣车</el-radio>
</el-col>
</el-row>
</div>
</div>
<div v-if="JumpStop">
<div
style="padding: 15px; margin-bottom: 25px; margin-top: 20px; border: 1px solid lightgray; height: 115px;"
>
<span class="base-label" style="left: -5px; top: -22px; background: #ECE9D8; padding: 0 4px;">范围</span>
<el-row style="margin-top: -13px;">
<el-col :span="24">
<el-radio-group v-model="radio" @change="chooseJumpStop">
<el-radio
:id="radio == '02' ? domIdChoose : ''"
label="01"
style="display: block; text-align: left; margin-right: 10px; margin-bottom: 20px; width: 80px;"
>
站台跳停
</el-radio>
<el-radio
:id="radio == '01' ? domIdChoose : ''"
label="02"
style="display: block; text-align: left; margin-left: 0; float: left;"
>
指定列车跳停</el-radio>
<div style="float: left;">
<span>车组号</span>
<el-input
v-if="radio1 != 2"
:id="domIdJumpStop"
v-model="tripNumber"
style="width: 120px; margin-left: 20px;"
size="small"
:disabled="radio == '01'"
@blur="handleTrainNoBlur"
/>
<el-select
v-if="radio1 == 2"
:id="domIdCancelJumpStop"
v-model="tripNumber"
style="width: 120px; margin-left: 20px;"
size="mini"
:disabled="radio == '01'"
@change="trainNoSelectChange"
>
<el-option
v-for="option in trainList"
:key="option.groupNumber"
:label="option.groupNumber"
:value="option.groupNumber"
/>
</el-select>
</div>
</el-radio-group>
</el-col>
</el-row>
</div>
<div style="padding: 15px; margin-top: 20px; border: 1px solid lightgray;">
<span class="base-label" style="left: -5px; top: -22px; background: #ECE9D8; padding: 0 4px;">功能</span>
<el-row style="margin-top: -13px;">
<el-col :span="11">
<el-radio
v-model="radio1"
label="1"
:disabled="radio1 == 2"
style="display: block; text-align: left;"
>
跳停</el-radio>
</el-col>
<el-col :span="11" :offset="2">
<el-radio
v-model="radio1"
label="2"
:disabled="radio1 == 1"
style="display: block; text-align: left;"
>
取消跳停</el-radio>
</el-col>
</el-row>
</div>
</div>
<div v-if="RunLevel">
<div
style="padding: 15px; margin-bottom: 25px; margin-top: 20px; border: 1px solid lightgray; height: 115px;"
>
<span class="base-label" style="left: -5px; top: -22px; background: #ECE9D8; padding: 0 4px;">范围</span>
<el-row style="margin-top: -13px;">
<el-radio-group v-model="radio" @change="chooseStopTime">
<el-col :span="24">
<el-radio
:id="radio == '02' ? domIdChoose1 : ''"
label="01"
style="display: block; text-align: left; margin-right: 10px; margin-bottom: 20px; width: 60px;"
>
自动
</el-radio>
<el-radio
:id="radio == '01' ? domIdChoose1 : ''"
label="02"
style="display: block; text-align: left; margin-left: 0; float: left;"
>
人工</el-radio>
<div style="float: left; margin-left: 20px;">
<span v-if="radio2 != 2">站停时间</span>
<span v-if="radio2 == 2">运行等级</span>
<el-input
v-if="radio2 != 2"
:id="domIdStopTime"
v-model="trainStopTime"
style="width: 120px; margin-left: 20px;"
size="small"
:disabled="radio == '01'"
@blur="stopTimeBlur"
/>
<el-select
v-if="radio2 == 2"
:id="domIdRunLevel"
v-model="trainRunlevel"
style="width: 120px; margin-left: 20px;"
size="mini"
:disabled="radio == '01'"
@change="trainNoSelectLevel"
>
<el-option
v-for="option in runLevelList"
:key="option.value"
:label="option.label"
:value="option.value"
/>
</el-select>
</div>
</el-col>
</el-radio-group>
</el-row>
</div>
<div style="padding: 15px; margin-top: 20px; border: 1px solid lightgray;">
<span class="base-label" style="left: -5px; top: -22px; background: #ECE9D8; padding: 0 4px;">功能</span>
<el-row style="margin-top: -13px;">
<el-radio-group v-model="effective" @change="chooseEffective">
<el-col :span="11">
<el-radio
:id="effective == '02' ? '': domIdChoose2"
label="01"
style="display: block; text-align: left;"
>
一次有效</el-radio>
</el-col>
<el-col :span="11" :offset="2">
<el-radio
:id="effective == '01' ? '': domIdChoose2"
label="02"
style="display: block; text-align: left;"
>
一直有效</el-radio>
</el-col>
</el-radio-group>
</el-row>
</div>
</div>
<el-row 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="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'StandDetainTrain',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
standName: '',
stationName: '',
selected: null,
operation: null,
radio: '01',
radio1: '1',
radio2: '1',
DetainTrain: false,
JumpStop: false,
RunLevel: false,
trainList: [],
runLevelList: [
{ value: '01', label: '常速' },
{ value: '02', label: '低速' },
{ value: '03', label: '高速' }
],
tripNumber: '',
effective: '01',
trainStopTime: 0,
trainRunlevel: '01'
};
},
computed: {
...mapGetters('map', [
'map'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
},
domIdDetainCar() {
return this.dialogShow ? OperationEvent.StationStand.cancelDetainTrain.choose.domId : '';
},
domIdChoose() {
if (this.radio1 == '1') { //
return this.dialogShow ? OperationEvent.StationStand.setJumpStop.select.domId : '';
} else { //
return this.dialogShow ? OperationEvent.StationStand.cancelJumpStop.select.domId : '';
}
},
domIdJumpStop() {
return this.dialogShow ? OperationEvent.StationStand.setJumpStop.choose.domId : '';
},
domIdCancelJumpStop() {
return this.dialogShow ? OperationEvent.StationStand.cancelJumpStop.choose.domId : '';
},
domIdChoose1() {
if (this.radio2 == '1') { //
return this.dialogShow ? OperationEvent.StationStand.setStopTime.choose1.domId : '';
} else { //
return this.dialogShow ? OperationEvent.StationStand.setRunLevel.choose1.domId : '';
}
},
domIdChoose2() {
if (this.radio2 == '1') { //
return this.dialogShow ? OperationEvent.StationStand.setStopTime.choose2.domId : '';
} else { //
return this.dialogShow ? OperationEvent.StationStand.setRunLevel.choose2.domId : '';
}
},
domIdStopTime() {
return this.dialogShow ? OperationEvent.StationStand.setStopTime.input.domId : '';
},
domIdRunLevel() {
return this.dialogShow ? OperationEvent.StationStand.setRunLevel.chooseTrain.domId : '';
},
title() {
if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) {
return '扣车';
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation) {
return '取消扣车';
} else if (this.operation == OperationEvent.StationStand.setJumpStop.menu.operation) {
return '设置跳停';
} else if (this.operation == OperationEvent.StationStand.cancelJumpStop.menu.operation) {
return '取消跳停';
} else if (this.operation == OperationEvent.StationStand.setStopTime.menu.operation) {
return '设置停站时间';
} else if (this.operation == OperationEvent.StationStand.setRunLevel.menu.operation) {
return '设置站间运行等级';
}
return '';
}
},
watch: {
operation(data) {
this.JumpStop = false;
this.RunLevel = false;
this.DetainTrain = false;
this.radio = '01';
this.radio1 = '1';
this.radio2 = '1';
this.trainStopTime = 0;
this.effective = '01';
if (data == OperationEvent.StationStand.setDetainTrain.menu.operation) {
this.radio1 = '1';
this.radio = '01';
this.DetainTrain = true;
} else if (data == OperationEvent.StationStand.cancelDetainTrain.menu.operation) {
this.radio1 = '2';
this.radio = '01';
this.DetainTrain = true;
} else if (data == OperationEvent.StationStand.setJumpStop.menu.operation) {
this.JumpStop = true;
this.radio1 = '1';
} else if (data == OperationEvent.StationStand.cancelJumpStop.menu.operation) {
this.JumpStop = true;
this.radio1 = '2';
} else if (data == OperationEvent.StationStand.setStopTime.menu.operation) {
this.RunLevel = true;
this.radio2 = '1';
} else if (data == OperationEvent.StationStand.setRunLevel.menu.operation) {
this.RunLevel = true;
this.radio2 = '2';
}
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate, selected, tempDate = null) {
this.selected = selected;
if (!this.dialogShow) {
this.tripNumber = '';
this.standName = '';
this.stationName = '';
if (selected) {
this.standName = selected.direction == '01' ? '下行' : '上行';
}
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
this.standName = selected.direction == '01' ? '下行' : '上行';
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
if (this.operation == OperationEvent.StationStand.setJumpStop.menu.operation || this.operation == OperationEvent.StationStand.setJumpStop.menu.operation) {
this.radio = selected.direction;
} else if (this.operation == OperationEvent.StationStand.setStopTime.menu.operation) {
this.trainStopTime = Number(tempDate.parkingTime) === -1 ? 15 : Number(tempDate.parkingTime);
this.radio = Number(tempDate.parkingTime) === -1 ? '01' : '02';
this.effective = tempDate.parkingValidStatus ? '01' : '02';
}
this.operation = operate.operation;
this.trainList = this.map.trainList; //
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.operation = '';
},
choose(upDown) {
// code
console.log(upDown, this.radio);
const operate = {
operation: OperationEvent.StationStand.cancelDetainTrain.choose.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
},
handleTrainNoBlur() { //
const operate = {
operation: OperationEvent.StationStand.cancelDetainTrain.choose.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
},
trainNoSelectChange(upDown) { //
const operate = {
operation: OperationEvent.StationStand.cancelDetainTrain.choose.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
},
chooseJumpStop(upDown) {
const operate = {
operation: ''
};
if (this.radio1 == '1') { //
operate.operation = OperationEvent.StationStand.setJumpStop.select.operation;
} else { //
operate.operation = OperationEvent.StationStand.cancelJumpStop.select.operation;
}
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
},
chooseEffective(effective) {
const operate = {
operation: ''
};
if (this.radio2 == '1') { //
operate.operation = OperationEvent.StationStand.setStopTime.choose2.operation;
} else { //
operate.operation = OperationEvent.StationStand.setRunLevel.choose2.operation;
}
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
},
chooseStopTime(upDown) {
const operate = {
operation: ''
};
if (this.radio2 == '1') { //
operate.operation = OperationEvent.StationStand.setStopTime.choose1.operation;
} else { //
operate.operation = OperationEvent.StationStand.setRunLevel.choose1.operation;
}
if (this.radio === '01') {
this.trainStopTime = 0;
this.trainRunlevel = '01';
}
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
},
stopTimeBlur() {
const operate = {
operation: OperationEvent.StationStand.setStopTime.input.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
},
trainNoSelectLevel(upDown) {
const operate = {
operation: OperationEvent.StationStand.setRunLevel.chooseTrain.operation,
val: `${upDown}`,
param: {
Stand_RunLevel: `${upDown}`
}
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
},
commit() {
if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) {
this.setDetainTrain(); /** 设置扣车*/
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation) {
this.cancelDetainTrain(); /** 取消扣车*/
} else if (this.operation == OperationEvent.StationStand.setJumpStop.menu.operation) {
this.setJumpStop(); /** 设置跳停*/
} else if (this.operation == OperationEvent.StationStand.cancelJumpStop.menu.operation) {
this.cancelJumpStop(); /** 取消跳停*/
} else if (this.operation == OperationEvent.StationStand.setStopTime.menu.operation) {
this.setStopTime(); /** 设置停站时间*/
} else if (this.operation == OperationEvent.StationStand.setRunLevel.menu.operation) {
this.setRunLevel(); /** 设置站间运行等级*/
}
},
//
setDetainTrain() {
const operate = {
over: true,
operation: OperationEvent.StationStand.setDetainTrain.menu.operation,
cmdType: CMD.Stand.CMD_STAND_SET_HOLD_TRAIN
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
this.doClose();
if (!valid) {
this.$refs.noticeInfo.doShow(operate);
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
cancelDetainTrain() {
const operate = {
over: true,
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation,
cmdType: CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN,
val: `${this.radio}`,
param: {
Stand_AllLine: `${this.radio}`
}
};
if (this.radio == '02') {
operate.operation = OperationEvent.StationStand.cancelDetainTrainAll.menu.operation;
operate['val'] = '02';
} else if (this.radio == '03') {
operate.operation = OperationEvent.StationStand.cancelDetainTrainAll.menu.operation;
operate['val'] = '01';
}
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
this.doClose();
if (!valid) {
this.$refs.noticeInfo.doShow(operate);
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
setJumpStop() {
let val = this.radio;
if (this.radio == '02') {
val = this.radio + '::' + this.tripNumber;
}
const operate = {
over: true,
operation: OperationEvent.StationStand.setJumpStop.menu.operation,
cmdType: CMD.Stand.CMD_STAND_SET_JUMP_STOP,
val: val,
param: {
Stand_JumpStop_Range: `${this.radio}`,
Train_GroupNo: `${this.tripNumber}`
}
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
cancelJumpStop() {
const operate = {
over: true,
operation: OperationEvent.StationStand.cancelJumpStop.menu.operation,
cmdType: CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP,
val: this.radio + '::' + this.tripNumber,
param: {
Stand_JumpStop_Range: `${this.radio}`,
Train_GroupNo: `${this.tripNumber}`
}
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
setStopTime() {
const forver = this.effective == '02';
const operate = {
over: true,
operation: OperationEvent.StationStand.setStopTime.menu.operation,
cmdType: CMD.Stand.CMD_STAND_SET_PARK_TIME,
val: [`${this.radio}`, this.trainStopTime, forver].join('::'),
param: {
Stand_StopControl: `${this.radio}`,
Stand_StopTime: this.trainStopTime,
Stand_AlwaysValid: forver
}
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
});
},
//
setRunLevel() {
const forver = this.effective == '02';
let val = this.radio;
if (this.radio == '02') {
val = `${this.radio}::${this.trainRunlevel}::${forver}`;
} else {
val = `${this.radio}::01::${forver}`;
}
const operate = {
over: true,
operation: OperationEvent.StationStand.setRunLevel.menu.operation,
cmdType: CMD.Stand.CMD_STAND_SET_RUN_TIME,
val: val,
param: {
Stand_StopControl: `${this.radio}`,
Stand_RunLevel: this.radio === '02' ? `${this.trainRunlevel}` : '01',
Stand_AlwaysValid: `${forver}`
}
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.loading = false;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
}
}
};
</script>
<style>
.stand-detain-train .context {
height: 80px !important;
}
</style>

View File

@ -1,214 +0,0 @@
<template>
<el-dialog class="chengdou-03__systerm stand-detail" :title="title" :visible.sync="show" width="380px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-row class="header">
<el-col :span="10">
<span>车站</span>
</el-input>
</el-col>
<el-col :span="10" :offset="2">
<span>站台</span>
</el-col>
</el-row>
<el-row class="header">
<el-col :span="10">
<el-input v-model="stationName" size="small" disabled>
</el-input>
</el-col>
<el-col :span="10" :offset="2">
<el-input style="padding: 0 3px;" v-model="standName" size="small" disabled></el-input>
</el-col>
</el-row>
<el-row class="content">
<el-col :span="6">
<span>停站时间</span>
</el-col>
<el-col :span="18">
<el-input v-model="modelData.stopTime" size="small" disabled></el-input>
</el-col>
</el-row>
<el-row class="content">
<el-col :span="6">
<span>运行等级</span>
</el-col>
<el-col :span="18">
<el-input v-model="modelData.runLevel" size="small" disabled></el-input>
</el-col>
</el-row>
<el-row class="content">
<el-col :span="6">
<span>扣车</span>
</el-col>
<el-col :span="18">
<el-input v-model="modelData.detainCar" size="small" disabled></el-input>
</el-col>
</el-row>
<el-row class="content">
<el-col :span="6">
<span>跳停</span>
</el-col>
<el-col :span="18">
<el-input v-model="modelData.jumpStop" size="small" disabled></el-input>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="18">
<span style="opacity: 0;">1</span>
</el-col>
<el-col :span="4">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">退出</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo"></notice-info>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import CancelMouseState from '@/mixin/CancelMouseState';
export default {
name: 'StandDetail',
components: {
NoticeInfo
},
mixins: [
CancelMouseState
],
data() {
return {
dialogShow: false,
loading: false,
tempData: [],
stationName: '',
standName: '',
strategyMap: {
'01': '无折返',
'02': '无人折返',
'03': '自动换端',
'04': '默认'
},
modelData: {
stopTime: '自动',
runLevel: '自动',
detainCar: '无扣车',
jumpStop: '无跳停'
}
};
},
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.Command.close.confirm.domId : '';
},
title() {
return '站台信息';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
loadInitData(selected, opts) {
this.tempData = [];
const stationList = this.stationList.slice();
const index = this.stationList.findIndex(n => n.code == selected.stationCode);
let stationStand, station;
if (selected.direction == '01') { //
//
if (index != 0) {
stationStand = this.$store.getters['map/getDeviceByCode'](this.stationList[index - 1].code);
station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
}
} else {
//
if (index != this.stationList.length - 1) {
stationStand = this.$store.getters['map/getDeviceByCode'](this.stationList[index + 1].code);
station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
}
}
this.modelData = {
stopTime: opts.parkingTime != -1 ? opts.parkingTime : '自动',
runLevel: opts.intervalRunTime > 0 ? '常速' : '自动',
detainCar: opts.holdStatus == '02' || opts.holdStatus == '04' ? '已设置' : '无扣车',
jumpStop: opts.jumpStopStatus != '01' ? '已设置' : '无跳停'
};
},
doShow(operate, selected, opts) {
this.selected = selected;
if (!this.dialogShow) {
this.standName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
this.standName = selected.direction == '01' ? '下行' : '上行';
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
this.loadInitData(selected, opts);
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
const operate = {
over: true,
operation: OperationEvent.Command.close.confirm.operation,
cmdType: CMD.Stand.CMD_STAND_VIEW_STATUS
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => {
this.doClose();
});
}
}
};
</script>
<style>
.content {
margin-top: 20px;
}
</style>

View File

@ -1,249 +0,0 @@
<template>
<el-dialog v-dialogDrag class="chengdou-03__systerm switch-control" :title="title" :visible.sync="show" width="300px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<el-row class="header">
<el-col :span="11"><span>车站名称</span></el-col>
<el-col :span="11" :offset="2"><span>道岔</span></el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-input v-model="stationName" size="small" disabled />
</el-col>
<el-col :span="11" :offset="2">
<el-input v-model="switchName" size="small" disabled />
</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="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
<password-box ref="passwordBox" @checkOver="passWordCommit" />
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
import CancelMouseState from '@/mixin/CancelMouseState';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
import PasswordBox from './childDialog/passwordInputBox';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'SwitchControl',
components: {
NoticeInfo,
PasswordBox
},
mixins: [
CancelMouseState
],
data() {
return {
dialogShow: false,
loading: false,
selected: null,
operation: '',
stationName: '',
switchName: ''
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
},
title() {
if (this.operation == OperationEvent.Switch.locate.menu.operation) {
return '单操到定位';
} else if (this.operation == OperationEvent.Switch.reverse.menu.operation) {
return '单操到反位';
} else if (this.operation == OperationEvent.Switch.lock.menu.operation) {
return '道岔单锁';
} else if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
return '道岔解锁';
} else if (this.operation == OperationEvent.Switch.block.menu.operation) {
return '道岔封锁';
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
return '区故解';
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
return '道岔解封';
}
return '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate, selected) {
this.selected = selected;
if (!this.dialogShow) {
this.switchName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Switch'.toUpperCase()) {
this.switchName = selected.name;
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
this.operation = operate.operation;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
if (this.operation == OperationEvent.Switch.locate.menu.operation) {
this.locate(); //
} else if (this.operation == OperationEvent.Switch.reverse.menu.operation) {
this.reverse(); //
} else if (this.operation == OperationEvent.Switch.lock.menu.operation) {
this.lock(); //
} else if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
this.unlock(); //
} else if (this.operation == OperationEvent.Switch.block.menu.operation) {
this.openPasswordBox(this.operation, OperationEvent.Switch.block.confirm.operation); //
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
this.openPasswordBox(this.operation, OperationEvent.Switch.unblock.confirm.operation); //
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
this.openPasswordBox(this.operation, OperationEvent.Switch.fault.confirm.operation); //
}
},
passWordCommit(data) { //
if (data.operation === OperationEvent.Switch.fault.menu.operation) {
this.fault();
} else if (data.operation === OperationEvent.Switch.block.menu.operation) {
this.block();
} else if (data.operation === OperationEvent.Switch.unblock.menu.operation) {
this.unblock();
}
},
//
lock() {
const operate = {
over: true,
operation: OperationEvent.Switch.lock.menu.operation,
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK
};
this.sendCommand(operate);
},
//
unlock() {
const operate = {
over: true,
operation: OperationEvent.Switch.unlock.menu.operation,
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
};
this.sendCommand(operate);
},
//
block() {
const operate = {
over: true,
operation: OperationEvent.Switch.block.menu.operation,
cmdType: CMD.Switch.CMD_SWITCH_BLOCK
};
this.sendCommand(operate);
},
//
unblock() {
const operate = {
over: true,
operation: OperationEvent.Switch.unblock.menu.operation,
cmdType: CMD.Switch.CMD_SWITCH_UNBLOCK
};
this.sendCommand(operate);
},
//
locate() {
const operate = {
over: true,
operation: OperationEvent.Switch.locate.menu.operation,
cmdType: CMD.Switch.CMD_SWITCH_TURN
};
this.sendCommand(operate);
},
//
reverse() {
const operate = {
over: true,
operation: OperationEvent.Switch.reverse.menu.operation,
cmdType: CMD.Switch.CMD_SWITCH_TURN
};
this.sendCommand(operate);
},
//
fault() {
const operate = {
over: true,
operation: OperationEvent.Switch.fault.menu.operation,
cmdType: CMD.Switch.CMD_SWITCH_FAULT_UNLOCK
};
this.sendCommand(operate);
},
//
openPasswordBox(operation, operateNext) {
const operate = {
operation: operation,
operateNext: operateNext
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.passwordBox.doShow(operate);
}
}).catch(() => {
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
sendCommand(operate) { //
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
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>

View File

@ -1,337 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm train-control"
:title="title"
:visible.sync="show"
width="480px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div class="el-dialog-div">
<el-form ref="form" size="small" label-width="80px" :model="addModel" :rules="rules" label-position="left">
<el-row>
<el-col :span="11">
<el-form-item prop="stationName">
<span slot="label">车站</span>
<el-input v-model="addModel.stationName" />
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item v-if="operation != '70c'" prop="sectionCode">
<span slot="label">轨道</span>
<el-input v-model="addModel.sectionCode" />
</el-form-item>
<el-form-item v-else prop="trainWindowCode">
<span slot="label">车次窗</span>
<el-input v-model="addModel.trainWindowCode" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item label="车组号:" prop="groupNumber">
<el-select v-model="addModel.groupNumber" filterable>
<el-option
v-for="train in trainList"
:key="train.groupNumber"
:label="train.groupNumber"
:value="train.groupNumber"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item v-if="operation == '708'" prop="serviceNumber">
<span slot="label">服务号</span>
<el-input v-model="addModel.serviceNumber" />
</el-form-item>
<el-form-item v-else-if="operation == '70c'" prop="targetCode">
<span slot="label">目的地</span>
<el-input v-model="addModel.targetCode" />
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item v-if="operation == '708'" prop="trainCode">
<span slot="label">序列号</span>
<el-input v-model="addModel.trainCode" />
</el-form-item>
<el-form-item v-else-if="operation == '70c'" prop="serviceNumber">
<span slot="label">服务号</span>
<el-input v-model="addModel.serviceNumber" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col>
<el-form-item v-if="operation == '70c'" prop="trainType">
<span slot="label">运行模式</span>
<br>
<el-radio-group v-model="addModel.runningMode" style="margin-left: 15px;">
<el-radio :label="'01'">普通</el-radio>
<el-radio :label="'02'">专列</el-radio>
<el-radio :label="'03'">不停站直达</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<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="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<confirm-train ref="confirmTrain" />
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import CancelMouseState from '@/mixin/CancelMouseState';
import ConfirmTrain from './childDialog/confirmTrain';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
export default {
name: 'TrainControl',
components: {
ConfirmTrain,
NoticeInfo
},
mixins: [
CancelMouseState
],
data() {
return {
trainList: [],
selected: null,
addModel: {
stationName: '',
sectionCode: '',
trainWindowCode: '',
groupNumber: '',
serviceNumber: '',
targetCode: '',
trainCode: '',
runningMode: ''
},
rules: {
stationName: [
{ required: true, message: '请输入车站', trigger: 'blur'}
],
sectionCode: [
{ required: true, message: '请输入轨道', trigger: 'blur'}
],
trainWindowCode: [
{ required: true, message: '请输入车次窗', trigger: 'blur'}
],
groupNumber: [
{ required: true, message: '请选择车组号', trigger: 'change' }
],
serviceNumber: [
{ required: true, message: '请输入服务号', trigger: 'blur'}
],
targetCode: [
{ required: true, message: '请输入目的地号', trigger: 'blur'}
],
trainCode: [
{ required: true, message: '请输入序列号', trigger: 'blur'}
],
runningMode: [
{ required: true, message: '请选择运行模式', trigger: 'blur'}
]
},
operation: null,
dialogShow: false,
loading: false,
direction: 0
};
},
computed: {
...mapGetters('map', [
'map'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Train.destinationTrainId.menu.operation) {
/* 设目的地*/
return OperationEvent.Train.destinationTrainId.menu.domId;
} else if (this.operation == OperationEvent.Train.setPlanTrainId.menu.operation) {
/* 设计划车*/
return OperationEvent.Train.setPlanTrainId.menu.domId;
} else if (this.operation == OperationEvent.Train.artificialTrainId.menu.operation) {
/* 设人工车*/
return OperationEvent.Train.artificialTrainId.menu.domId;
}
return '';
}
return '';
},
title() {
if ( this.operation == OperationEvent.Train.destinationTrainId.menu.operation) {
return '设目的地车';
} else if ( this.operation == OperationEvent.Train.setPlanTrainId.menu.operation ) {
return '设计划车';
} else if ( this.operation == OperationEvent.Train.artificialTrainId.menu.operation ) {
return '设人工车';
}
return '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
loadInitData(map) {
},
doShow(operate, selected) {
this.selected = selected;
//
if (!this.dialogShow) {
this.operation = operate.operation;
}
this.addModel = {
tripNumber: '',
groupNumber: '',
trainType: '01',
serviceNumber: '',
targetCode: ''
};
/** 加载列车数据*/
this.loadInitData(this.map);
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false);
this.mouseCancelState(this.selected);
},
commit() {
if ( this.operation == OperationEvent.Train.destinationTrainId.menu.operation ) {
this.destinationTrainId();
} else if (this.operation == OperationEvent.Train.setPlanTrainId.menu.operation ) {
this.setPlanTrainId();
} else if (this.operation == OperationEvent.Train.artificialTrainId.menu.operation ) {
this.artificialTrainId();
}
},
//
destinationTrainId() {
this.$refs['form'].validate((valid) => {
if (valid) {
const operate = {
operation: OperationEvent.Train.destinationTrainId.menu.operation,
message: [`设目的地车:成功`],
val: ''
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.doClose();
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
} else {
return false;
}
});
},
//
setPlanTrainId() {
this.$refs['form'].validate((valid) => {
if (valid) {
const operate = {
operation: OperationEvent.Train.setPlanTrainId.menu.operation,
message: [`设计划车:成功`],
val: ''
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.doClose();
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
} else {
return false;
}
});
},
//
artificialTrainId() {
this.$refs['form'].validate((valid) => {
if (valid) {
const operate = {
operation: OperationEvent.Train.artificialTrainId.menu.operation,
message: [`设人工车:成功`],
val: ''
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.doClose();
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
} else {
return false;
}
});
},
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>
<style scoped>
.el-dialog-div {
height: 400px;
overflow: auto;
}
</style>

View File

@ -1,138 +0,0 @@
<template>
<el-dialog v-dialogDrag class="chengdou-03__systerm route-create" :title="title" :visible.sync="show" width="380px" label-position="top" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<div style="padding: 10px 20px; border: 1px solid lightgray;">
<el-form size="small" label-width="100px">
<el-form-item label="列车:" prop="trainCode">
<el-select v-model="trainCode" filterable placeholder="列车">
<el-option
v-for="item in trainList"
:key="item.code"
:label="item.groupNumber"
:value="item.code"
/>
</el-select>
</el-form-item>
<el-form-item label="列车方向:" prop="direction">
<el-select v-model="direction" filterable placeholder="列车方向">
<el-option v-for="no in directionList" :key="no.value" :label="no.label" :value="no.value" />
</el-select>
<!-- <div style="font-size: 12px;">(上行路线车次号选择偶数下行路线车次号选择基数)</div> -->
</el-form-item>
</el-form>
<el-row>
<el-col style="text-align: right;">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
</div>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'RouteCreate',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
trainList: [],
trainNoList: [],
directionList: [
{
value: '2',
label: '上行'
},
{
value: '1',
label: '下行'
}
],
trainCode: '',
tripNumber: '',
direction: '',
selected: null
};
},
computed: {
...mapGetters('map', [
'map'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return OperationEvent.Section.newtrain.menu.domId;
},
title() {
return '设置列车';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate, selected) {
this.dialogShow = true;
this.selected = selected;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.trainCode = '';
this.direction = '';
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
const operate = {
send: true,
operation: OperationEvent.Section.newtrain.menu.operation,
cmdType: CMD.Section.CMD_NEW_TRAIN,
val: '' + this.direction + '::' + this.trainCode
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
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>

View File

@ -1,186 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm stand-stop-time"
:title="title"
:visible.sync="show"
width="480px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div class="el-dialog-div">
<el-form ref="form" size="small" label-width="80px" :model="addModel" :rules="rules" label-position="left">
<el-row>
<el-col :span="11">
<el-form-item prop="stationName">
<span slot="label">车站</span>
<el-input v-model="addModel.stationName" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item prop="trainWindowCode">
<span slot="label">车次窗</span>
<el-input v-model="addModel.trainWindowCode" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item label="车 组 号:" prop="groupNumber">
<el-select v-model="addModel.groupNumber" filterable>
<el-option
v-for="train in trainList"
:key="train.groupNumber"
:label="train.groupNumber"
:value="train.groupNumber"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<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="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import CancelMouseState from '@/mixin/CancelMouseState';
export default {
name: 'TrainCreateNumber',
mixins: [
CancelMouseState
],
data() {
return {
trainNoList: [],
trainList: [],
selected: null,
addModel: {
stationName:'',
trainWindowCode: '',
groupNumber:''
},
rules: {
groupNumber: [
{ required: true, message: '请输入车组号', trigger: 'blur'}
]
},
dialogShow: false,
loading: false
};
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Train.editTrainNo.menu.domId : '';
},
title() {
return '新建车组号';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
loadInitData(map) {
},
doShow(operate, selected) {
this.selected = selected;
//
if (!this.dialogShow) {
this.addModel = {
stationName:'',
trainWindowCode: '',
groupNumber:''
};
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false);
this.mouseCancelState(this.selected);
},
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
const operate = {
send: true,
operation: OperationEvent.Train.createTrainNo.menu.operation
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
// this.$refs.noticeInfo.doShow(operate);
});
} else {
return false;
}
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => { this.doClose(); });
}
}
};
</script>
<style scoped>
.chengdou-03__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -18px;
padding: 0 5px;
background-color: #F0F0F0;
}
.el-dialog-div {
height: 400px;
overflow: auto;
}
</style>

View File

@ -1,155 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm stand-stop-time"
:title="title"
:visible.sync="show"
width="320px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-form ref="form" size="small" label-width="90px" :model="addModel" :rules="rules">
<el-form-item label="车 组 号:" prop="groupNumber">
<el-input v-model="addModel.groupNumber" />
</el-form-item>
</el-form>
<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="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<confirm-control ref="confirmControl" />
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
// import { getPublishMapTrainNos } from '@/api/runplan';
import CancelMouseState from '@/mixin/CancelMouseState';
import ConfirmControl from './childDialog/confirmControl';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
export default {
name: 'TrainDelete',
components: {
ConfirmControl,
NoticeInfo
},
mixins: [
CancelMouseState
],
data() {
return {
trainNoList: [],
selected: null,
addModel: {
groupNumber: ''
},
rules: {
groupNumber: [
{ required: true, message: '请输入车组号', trigger: 'blur' }
]
},
operation: null,
dialogShow: false,
loading: false
};
},
computed: {
...mapGetters('map', [
'map'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Train.delTrainId.menu.domId : '';
},
title() {
return '删除列车识别号';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
loadInitData(map) {
if (map) {
// getPublishMapTrainNos(map.skinCode).then(response => {
// this.trainNoList = response.data;
// }).catch(() => {
// this.$messageBox(``);
// });
}
},
doShow(operate, selected) {
this.selected = selected;
//
if (!this.dialogShow) {
this.operation = operate.operation;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false);
mouseCancelState(this.selected);
},
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
const operate = {
send: true,
operation: OperationEvent.Train.delTrainId.menu.operation
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
} else {
return false;
}
});
},
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>

View File

@ -1,181 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm stand-stop-time"
:title="title"
:visible.sync="show"
width="480px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div class="el-dialog-div">
<el-form ref="form" size="small" label-width="80px" :model="addModel" label-position="left">
<el-row>
<el-col :span="11">
<el-form-item prop="stationName">
<span slot="label">车站</span>
<el-input v-model="addModel.stationName" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item prop="trainWindowCode">
<span slot="label">车次窗</span>
<el-input v-model="addModel.trainWindowCode" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item label="车 组 号:" prop="groupNumber">
<el-select v-model="addModel.groupNumber" filterable disabled>
<el-option
v-for="train in trainList"
:key="train.groupNumber"
:label="train.groupNumber"
:value="train.groupNumber"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<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="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import CancelMouseState from '@/mixin/CancelMouseState';
export default {
name: 'TrainDeleteNumber',
mixins: [
CancelMouseState
],
data() {
return {
trainNoList: [],
trainList: [],
selected: null,
addModel: {
stationName:'',
trainWindowCode: '',
groupNumber:''
},
dialogShow: false,
loading: false
};
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Train.editTrainNo.menu.domId : '';
},
title() {
return '删除车组号';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
loadInitData(map) {
},
doShow(operate, selected) {
this.selected = selected;
//
if (!this.dialogShow) {
this.addModel = {
stationName:'',
trainWindowCode: '',
groupNumber:''
};
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false);
this.mouseCancelState(this.selected);
},
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
const operate = {
send: true,
operation: OperationEvent.Train.deleteTrainNo.menu.operation
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
// this.$refs.noticeInfo.doShow(operate);
});
} else {
return false;
}
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => { this.doClose(); });
}
}
};
</script>
<style scoped>
.chengdou-03__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -18px;
padding: 0 5px;
background-color: #F0F0F0;
}
.el-dialog-div {
height: 400px;
overflow: auto;
}
</style>

View File

@ -1,376 +0,0 @@
<template>
<el-dialog class="chengdou-03__systerm stand-stop-time" :title="title" :visible.sync="show" width="480px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<div class="el-dialog-div">
<el-tabs v-model="activeName" type="card" @tab-click="handleClick">
<el-tab-pane :id="domIdBasicInfo" label="基本信息" name="first">
<el-form size="small" label-width="80px" :model="addModel" ref="form" label-position="left">
<el-row>
<el-col :span="11">
<el-form-item prop="groupNumber">
<span slot="label">车组号</span>
<el-input v-model="addModel.groupNumber" :disabled="true"></el-input>
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item prop="type">
<span slot="label">服务类型</span>
<el-input v-model="addModel.type" :disabled="true"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item prop="serviceNumber">
<span slot="label">服务号</span>
<el-input v-model="addModel.serviceNumber" :disabled="true"></el-input>
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item prop="trainCode">
<span slot="label">序列号</span>
<el-input v-model="addModel.trainCode" :disabled="true"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item prop="driverCode">
<span slot="label">司机号</span>
<el-input v-model="addModel.driverCode" :disabled="true"></el-input>
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item prop="targetCode">
<span slot="label">目的地号</span>
<el-input v-model="addModel.targetCode" :disabled="true"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item prop="stationName">
<span slot="label">车站</span>
<el-input v-model="addModel.stationName" :disabled="true"></el-input>
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item prop="sectionCode">
<span slot="label">轨道</span>
<el-input v-model="addModel.sectionCode" :disabled="true"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item prop="nextStation">
<span slot="label">下一站</span>
<el-input v-model="addModel.nextStation" :disabled="true"></el-input>
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item prop="targetName">
<span slot="label">目的地</span>
<el-input v-model="addModel.targetName" :disabled="true"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item prop="trackingMode">
<span slot="label">跟踪模式</span>
<el-input v-model="addModel.trackingMode" :disabled="true"></el-input>
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item prop="runStatus">
<span slot="label">运行状态</span>
<el-input v-model="addModel.runStatus" :disabled="true"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item prop="departureTime">
<span slot="label">出发时刻</span>
<el-input v-model="addModel.departureTime" :disabled="true"></el-input>
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item prop="arrivedTime">
<span slot="label">到达时刻</span>
<el-input v-model="addModel.arrivedTime" :disabled="true"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item prop="planDeviation">
<span slot="label">计划偏离</span>
<el-input v-model="addModel.planDeviation" :disabled="true"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-tab-pane>
<el-tab-pane :id="domIdMarshalInfo" label="编组信息" name="second">
<el-form size="small" label-width="80px" :model="addModel" ref="form" label-position="left">
<el-row>
<el-col :span="11">
<el-form-item prop="marshallingNo">
<span slot="label">编组号</span>
<el-input v-model="addModel.marshallingNo" :disabled="true"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item prop="carNo1">
<span slot="label">车头号1</span>
<el-input v-model="addModel.carNo1" :disabled="true"></el-input>
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item prop="carNo2">
<span slot="label">车头号2</span>
<el-input v-model="addModel.carNo2" :disabled="true"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-table :data="tableData" style="width: 100%" height="250">
<el-table-column prop="carriage" label="车厢" width="80">
</el-table-column>
<el-table-column prop="carriageNumber" label="车厢号" width="80">
</el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane :id="domIdAtpInfo" label="ATP信息" name="third">
<el-form size="small" label-width="80px" :model="addModel" ref="form" label-position="left">
<el-row>
<el-col :span="11">
<el-form-item prop="trainId">
<span slot="label">车载ID</span>
<el-input v-model="addModel.trainId" :disabled="true"></el-input>
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item prop="directionType">
<span slot="label">运行方向</span>
<el-input v-model="addModel.directionType" :disabled="true"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item prop="drivingMode">
<span slot="label">驾驶模式</span>
<el-input v-model="addModel.drivingMode" :disabled="true"></el-input>
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item prop="speed">
<span slot="label">速度</span>
<el-input v-model="addModel.speed" :disabled="true"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item prop="stopQuasiState">
<span slot="label">停准状态</span>
<el-input v-model="addModel.stopQuasiState" :disabled="true"></el-input>
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item prop="doorStatus">
<span slot="label">车门状态</span>
<el-input v-model="addModel.doorStatus" :disabled="true"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item prop="runLevel">
<span slot="label">运行等级</span>
<el-input v-model="addModel.runLevel" :disabled="true"></el-input>
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item prop="stopState">
<span slot="label">停跳状态</span>
<el-input v-model="addModel.stopState" :disabled="true"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item prop="position">
<span slot="label">车头位置</span>
<el-input v-model="addModel.position" :disabled="true"></el-input>
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item prop="loadingRate">
<span slot="label">载重率</span>
<el-input v-model="addModel.loadingRate" :disabled="true"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-tab-pane>
<el-tab-pane :id="domIdCarAlarm" label="车辆报警" name="fourth"></el-tab-pane>
</el-tabs>
</div>
<el-row justify="center" class="button-group">
<el-col :span="4" :offset="19">
<el-button :id="domIdCancel" @click="cancel">退出</el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import CancelMouseState from '@/mixin/CancelMouseState';
export default {
name: 'TrainDetailInfo',
mixins: [
CancelMouseState
],
data() {
return {
trainNoList: [],
trainList: [],
selected: null,
addModel: {
stationName:'',
groupNumber:'',
type:'',
serviceNumber:'',
trainCode:'',
driverCode:'',
targetCode:'',
sectionCode:'',
nextStation:'',
targetName:'',
trackingMode:'',
runStatus:'',
departureTime:'',
arrivedTime:'',
planDeviation:'',
marshallingNo:'',
carNo1:'',
carNo2:'',
trainId:'',
directionType:'',
drivingMode:'',
speed:'',
stopQuasiState:'',
doorStatus:'',
runLevel:'',
stopState:'',
position:'',
loadingRate:'',
},
activeName:'first',
dialogShow: false,
loading: false,
tableData:[
{carriage:'1',carriageNumber:'101'},
{carriage:'2',carriageNumber:'102'},
{carriage:'3',carriageNumber:'103'},
{carriage:'4',carriageNumber:'104'},
{carriage:'5',carriageNumber:'105'},
{carriage:'6',carriageNumber:'106'},
]
}
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdCarAlarm() {
return this.dialogShow ? OperationEvent.Train.detailTrainInfo.carAlarm.domId : '';
},
domIdBasicInfo() {
return this.dialogShow ? OperationEvent.Train.detailTrainInfo.basicInfo.domId : '';
},
domIdMarshalInfo() {
return this.dialogShow ? OperationEvent.Train.detailTrainInfo.marshalInfo.domId : '';
},
domIdAtpInfo() {
return this.dialogShow ? OperationEvent.Train.detailTrainInfo.atpInfo.domId : '';
},
title() {
return '列车信息显示'
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate, selected) {
this.selected = selected;
//
if (!this.dialogShow) {
this.addModel ={
stationName:'',
tripNumber: '',
groupNumber:'',
}
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false);
this.mouseCancelState(this.selected);
},
handleClick() {
},
cancel() {
let operate = {
operation: OperationEvent.Command.cancel.menu.operation,
}
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => { this.doClose(); });
}
}
}
</script>
<style scoped>
.chengdou-03__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -18px;
padding: 0 5px;
background-color: #F0F0F0;
}
.el-dialog-div {
height: 400px;
overflow: auto;
}
</style>

View File

@ -1,179 +0,0 @@
<template>
<el-dialog v-dialogDrag class="chengdou-03__systerm stand-stop-time" :title="title" :visible.sync="show" width="480px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<div class="el-dialog-div">
<el-form ref="form" size="small" label-width="80px" :model="addModel" :rules="rules" label-position="left">
<el-form-item>
<el-col :span="11">
<el-form-item prop="stationName">
<span slot="label">车站</span>
<el-input v-model="addModel.stationName" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item prop="trainWindowCode">
<span slot="label">车次窗</span>
<el-input v-model="addModel.trainWindowCode" :disabled="true" />
</el-form-item>
</el-col>
</el-form-item>
<el-row>
<el-col :span="11">
<el-form-item label="旧车组号" prop="oldGroupNumber">
<el-select v-model="addModel.oldGroupNumber" filterable disabled>
<el-option v-for="train in trainList" :key="train.oldGroupNumber" :label="train.oldGroupNumber" :value="train.oldGroupNumber" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item label="新车组号" prop="newGroupNumber">
<el-select v-model="addModel.newGroupNumber">
<el-option v-for="train in trainList" :key="train.newGroupNumber" :label="train.newGroupNumber" :value="train.newGroupNumber" />
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<el-row justify="center" class="button-group-train">
<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="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import CancelMouseState from '@/mixin/CancelMouseState';
export default {
name: 'TrainEditNumber',
mixins: [
CancelMouseState
],
data() {
return {
trainNoList: [],
trainList: [],
selected: null,
addModel: {
stationName: '',
trainWindowCode: '',
oldGroupNumber: '',
newGroupNumber: ''
},
rules: {
newGroupNumber: [
{ required: true, message: '请输入新车组号', trigger: 'blur'}
]
},
dialogShow: false,
loading: false
};
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Train.editTrainNo.menu.domId : '';
},
title() {
return '修改车组号';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
loadInitData(map) {
},
doShow(operate, selected) {
this.selected = selected;
//
if (!this.dialogShow) {
this.addModel = {
stationName: '',
trainWindowCode: '',
oldGroupNumber: '',
newGroupNumber: ''
};
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false);
this.mouseCancelState(this.selected);
},
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
const operate = {
send: true,
operation: OperationEvent.Train.editTrainNo.menu.operation
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
});
} else {
return false;
}
});
},
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>
<style scoped>
.chengdou-03__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -18px;
padding: 0 5px;
background-color: #F0F0F0;
}
.el-dialog-div {
height: 400px;
overflow: auto;
}
</style>

View File

@ -1,191 +0,0 @@
<template>
<el-dialog class="chengdou-03__systerm stand-stop-time" :title="title" :visible.sync="show" width="640px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-form size="small" label-width="80px" :model="addModel" :rules="rules" ref="form">
<div style="width: 46%;">
<el-form-item label="车 组 号:" label-width="95px" prop="tripNumber">
<el-input v-model="addModel.tripNumber" disabled></el-input>
</el-form-item>
</div>
<div style="overflow: hidden;">
<div
style="width: 48%; float: left; padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px; margin-right: 4%;">
<span class="base-label">源车次窗</span>
<div style="position: relative; top:-10px;">
<el-form-item prop="stationStandSource">
<span slot="label">&emsp; :</span>
<el-select v-model="addModel.stationStandSource" filterable placeholder="请选择">
<el-option v-for="item in stationStandList" :key="item.code" :label="item.name"
:value="item.code">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="车 次 窗:" prop="trainSource">
<el-input v-model="addModel.trainSource"></el-input>
</el-form-item>
</div>
</div>
<div
style="width: 48%; float: left; padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px;">
<span class="base-label">目的车次窗</span>
<div style="position: relative; top:-10px;">
<el-form-item prop="stationStandGoal">
<span slot="label">&emsp; :</span>
<el-select v-model="addModel.stationStandGoal" filterable placeholder="请选择">
<el-option v-for="item in stationStandList" :key="item.code" :label="item.name"
:value="item.code">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="车 次 窗:" prop="trainGoal">
<el-input v-model="addModel.trainGoal"></el-input>
</el-form-item>
</div>
</div>
</div>
</el-form>
<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="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import CancelMouseState from '@/mixin/CancelMouseState';
export default {
name: 'TrainMove',
mixins: [
CancelMouseState
],
data() {
return {
trainNoList: [],
selected: null,
addModel: {
tripNumber: '',
trainSource: '',
stationStandSource: '',
trainGoal: '',
stationStandGoal: '',
},
rules: {
tripNumber: [
{ required: true, message: '请输入车组号', trigger: 'blur' }
],
trainSource: [
{ required: true, message: '请输入车次号', trigger: 'blur' }
],
stationStandSource: [
{ required: true, message: '请选择车站', trigger: 'change' }
],
trainGoal: [
{ required: true, message: '请输入车次号', trigger: 'blur' }
],
stationStandGoal: [
{ required: true, message: '请选择车站', trigger: 'change' }
],
},
dialogShow: false,
loading: false,
}
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Train.moveTrainId.menu.domId : '';
},
title() {
return '移动列车识别号'
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate, selected) {
this.selected = selected;
//
if (!this.dialogShow) {
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false);
this.mouseCancelState(this.selected);
},
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
let operate = {
send: true,
operation: OperationEvent.Train.moveTrainId.menu.operation,
}
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
// this.$refs.noticeInfo.doShow(operate);
})
} else {
return false;
}
});
},
cancel() {
let operate = {
operation: OperationEvent.Command.cancel.menu.operation,
}
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => { this.doClose(); });
}
}
}
</script>
<style scoped>
.chengdou-03__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -18px;
padding: 0 5px;
background-color: #F0F0F0;
}
</style>

View File

@ -1,198 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm stand-stop-time"
:title="title"
:visible.sync="show"
width="480px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div class="el-dialog-div">
<el-form ref="form" size="small" label-width="90px" :model="addModel" label-position="left">
<el-row>
<el-col :span="11">
<el-form-item prop="stationName">
<span slot="label">车站</span>
<el-input v-model="addModel.stationName" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item prop="trainWindowCode">
<span slot="label">车次窗</span>
<el-input v-model="addModel.trainWindowCode" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item label="车 组 号:" prop="groupNumber">
<el-select v-model="addModel.groupNumber" filterable disabled>
<el-option
v-for="train in trainList"
:key="train.groupNumber"
:label="train.groupNumber"
:value="train.groupNumber"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item prop="purposeStationName">
<span slot="label">车站</span>
<el-input v-model="addModel.purposeStationName" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item prop="purposeTrainWindowCode">
<span slot="label">目的车次窗</span>
<el-input v-model="addModel.purposeTrainWindowCode" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<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="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import CancelMouseState from '@/mixin/CancelMouseState';
export default {
name: 'TrainMoveNumber',
mixins: [
CancelMouseState
],
data() {
return {
trainNoList: [],
trainList: [],
selected: null,
addModel: {
stationName: '',
trainWindowCode: '',
groupNumber: '',
purposeStationName: '',
purposeTrainWindowCode: ''
},
dialogShow: false,
loading: false
};
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Train.editTrainNo.menu.domId : '';
},
title() {
return '移动车组号';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
loadInitData(map) {
},
doShow(operate, selected) {
this.selected = selected;
//
if (!this.dialogShow) {
this.addModel = {
stationName: '',
trainWindowCode: '',
groupNumber: '',
purposeStationName: '',
purposeTrainWindowCode: ''
};
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false);
this.mouseCancelState(this.selected);
},
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
const operate = {
send: true,
operation: OperationEvent.Train.moveTrainNo.menu.operation
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
// this.$refs.noticeInfo.doShow(operate);
});
} else {
return false;
}
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => { this.doClose(); });
}
}
};
</script>
<style scoped>
.chengdou-03__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -18px;
padding: 0 5px;
background-color: #F0F0F0;
}
.el-dialog-div {
height: 400px;
overflow: auto;
}
</style>

View File

@ -1,196 +0,0 @@
<template>
<el-dialog class="chengdou-03__systerm stand-stop-time" :title="title" :visible.sync="show" width="640px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-form size="small" label-width="80px" :model="addModel" :rules="rules" ref="form">
<div style="overflow: hidden;">
<div
style="width: 48%; float: left; padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 177px; margin-right: 4%;">
<span class="base-label">源车次窗</span>
<div style="position: relative; top:-10px;">
<el-form-item label="车 组 号:" prop="trainNumberSource">
<el-input v-model="addModel.trainNumberSource"></el-input>
</el-form-item>
<el-form-item prop="stationStandSource">
<span slot="label">&emsp; :</span>
<el-select v-model="addModel.stationStandSource" filterable placeholder="请选择">
<el-option v-for="item in stationStandList" :key="item.code" :label="item.name"
:value="item.code">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="车 次 窗:" prop="trainSource">
<el-input v-model="addModel.trainSource"></el-input>
</el-form-item>
</div>
</div>
<div
style="width: 48%; float: left; padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 177px;">
<span class="base-label">目的车次窗</span>
<div style="position: relative; top:-10px;">
<el-form-item label="车 组 号:" prop="trainNumberGoal">
<el-input v-model="addModel.trainNumberGoal"></el-input>
</el-form-item>
<el-form-item prop="stationStandGoal">
<span slot="label">&emsp; :</span>
<el-select v-model="addModel.stationStandGoal" filterable placeholder="请选择">
<el-option v-for="item in stationStandList" :key="item.code" :label="item.name"
:value="item.code">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="车 次 窗:" prop="trainGoal">
<el-input v-model="addModel.trainGoal"></el-input>
</el-form-item>
</div>
</div>
</div>
</el-form>
<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="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import CancelMouseState from '@/mixin/CancelMouseState';
export default {
name: 'TrainSwitch',
mixins: [
CancelMouseState
],
data() {
return {
trainNoList: [],
selected: null,
addModel: {
trainNumberSource: '',
trainSource: '',
stationStandSource: '',
trainGoal: '',
stationStandGoal: '',
trainNumberGoal: '',
},
rules: {
trainNumberSource: [
{ required: true, message: '请输入车组号', trigger: 'blur' }
],
trainSource: [
{ required: true, message: '请输入车次号', trigger: 'blur' }
],
stationStandSource: [
{ required: true, message: '请选择车站', trigger: 'change' }
],
trainNumberGoal: [
{ required: true, message: '请输入车组号', trigger: 'blur' }
],
trainGoal: [
{ required: true, message: '请输入车次号', trigger: 'blur' }
],
stationStandGoal: [
{ required: true, message: '请选择车站', trigger: 'change' }
],
},
dialogShow: false,
loading: false,
}
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Train.moveTrainId.menu.domId : '';
},
title() {
return '移动列车识别号'
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate, selected) {
this.selected = selected;
//
if (!this.dialogShow) {
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false);
this.mouseCancelState(this.selected);
},
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
let operate = {
send: true,
operation: OperationEvent.Train.moveTrainId.menu.operation,
}
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
// this.$refs.noticeInfo.doShow(operate);
})
} else {
return false;
}
});
},
cancel() {
let operate = {
operation: OperationEvent.Command.cancel.menu.operation,
}
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => { this.doClose(); });
}
}
}
</script>
<style scoped>
.chengdou-03__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -18px;
padding: 0 5px;
background-color: #F0F0F0;
}
</style>

View File

@ -1,13 +1,11 @@
<template> <template>
<div class="chengdou-03__menus" :style="{width: width + 'px'}"> <div class="chengdou-01__menus" :style="{width: width + 'px'}">
<menu-cancel ref="menuCancel" /> <menu-cancel ref="menuCancel" />
<template v-show="isShowAll"> <template v-show="isShowAll">
<template v-show="isShowBar"> <template v-show="isShowBar">
<menu-bar ref="menuBar" :selected="selected" /> <menu-bar ref="menuBar" :selected="selected" />
</template> </template>
<menu-button ref="menuButton" />
<menu-request ref="menuRequest" /> <menu-request ref="menuRequest" />
<menu-station-control ref="menuStationControl" :selected="selected" />
<menu-station-stand ref="menuStationStand" :selected="selected" /> <menu-station-stand ref="menuStationStand" :selected="selected" />
<menu-switch ref="menuSwitch" :selected="selected" /> <menu-switch ref="menuSwitch" :selected="selected" />
<menu-signal ref="menuSignal" :selected="selected" /> <menu-signal ref="menuSignal" :selected="selected" />
@ -27,8 +25,6 @@ import { mapGetters } from 'vuex';
import MenuRequest from './menuRequest'; import MenuRequest from './menuRequest';
import MenuCancel from './menuCancel'; import MenuCancel from './menuCancel';
import MenuSignal from './menuSignal'; import MenuSignal from './menuSignal';
import MenuButton from './menuButton';
import MenuStationControl from './menuStationControl';
import MenuStationStand from './menuStationStand'; import MenuStationStand from './menuStationStand';
import MenuSwitch from './menuSwitch'; import MenuSwitch from './menuSwitch';
import MenuSection from './menuSection'; import MenuSection from './menuSection';
@ -45,12 +41,10 @@ export default {
components: { components: {
MenuBar, MenuBar,
MenuRequest, MenuRequest,
MenuButton,
MenuCancel, MenuCancel,
MenuSignal, MenuSignal,
MenuSwitch, MenuSwitch,
MenuSection, MenuSection,
MenuStationControl,
MenuStationStand, MenuStationStand,
MenuStation, MenuStation,
MenuTrain, MenuTrain,
@ -99,23 +93,25 @@ export default {
</script> </script>
<style> <style>
.chengdou-03__menus .pop-menu { .chengdou-01__menus .pop-menu {
background: #5F9EA0; background: #5F9EA0;
} }
.chengdou-01__menus .pop-menu .el-popover{
.chengdou-03__menus .pop-menu span { background: #5F9EA0;
}
.chengdou-01__menus .pop-menu span {
color: #000; color: #000;
} }
.chengdou-03__menus .pop-menu .is-disabled span { .chengdou-01__menus .pop-menu .is-disabled span {
color: #B4B3B8; color: #B4B3B8;
} }
.chengdou-03__systerm { .chengdou-01__systerm {
overflow: hidden !important; overflow: hidden !important;
} }
.chengdou-03__systerm .el-dialog { .chengdou-01__systerm .el-dialog {
background: #0055E8; background: #0055E8;
box-shadow: 1px hsla(240, 0%, 100%, 0.5) inset; box-shadow: 1px hsla(240, 0%, 100%, 0.5) inset;
border: 1px solid rgb(69, 134, 247); border: 1px solid rgb(69, 134, 247);
@ -124,17 +120,17 @@ export default {
color: #000; color: #000;
} }
.chengdou-03__systerm .el-dialog span { .chengdou-01__systerm .el-dialog span {
font-size: 13px !important; font-size: 13px !important;
line-height: 22px; line-height: 22px;
} }
.chengdou-03__systerm .el-dialog .el-dialog__footer { .chengdou-01__systerm .el-dialog .el-dialog__footer {
background: #5F9EA0; background: #5F9EA0;
opacity: 1; opacity: 1;
} }
.chengdou-03__systerm .el-dialog .el-dialog__body { .chengdou-01__systerm .el-dialog .el-dialog__body {
padding: 20px; padding: 20px;
margin: 0px 3px 3px; margin: 0px 3px 3px;
border: 2px solid rgba(120, 121, 123, 0.5); border: 2px solid rgba(120, 121, 123, 0.5);
@ -143,15 +139,14 @@ export default {
opacity: 1; opacity: 1;
} }
.chengdou-03__systerm .el-dialog .el-dialog__title { .chengdou-01__systerm .el-dialog .el-dialog__title {
font-size: 16px; font-size: 16px;
color: #fff; color: #fff;
position: absolute; position: absolute;
top: 4px; top: 4px;
left: 7px;
} }
.chengdou-03__systerm .el-dialog .el-dialog__headerbtn { .chengdou-01__systerm .el-dialog .el-dialog__headerbtn {
background: linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770); background: linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770);
border: 1px solid #fff; border: 1px solid #fff;
border-radius: 4px; border-radius: 4px;
@ -160,98 +155,106 @@ export default {
line-height: 16px; line-height: 16px;
} }
.chengdou-03__systerm .el-dialog .el-dialog__headerbtn .el-icon-close:before { .chengdou-01__systerm .el-dialog .el-dialog__headerbtn .el-icon-close:before {
font-size: 16px; font-size: 16px;
} }
.chengdou-03__systerm .el-dialog .el-dialog__headerbtn .el-dialog__close { .chengdou-01__systerm .el-dialog .el-dialog__headerbtn .el-dialog__close {
color: #fff; color: #fff;
} }
.chengdou-03__systerm .el-dialog .el-button { .chengdou-01__systerm .el-dialog .el-button {
height: 24px; height: 24px;
line-height: 22px; line-height: 22px;
padding: 0px; padding: 0px;
width: 80px; width: 80px;
border: 2px outset #E2E2E2; border: 2px outset #B7D4D5;
border-radius: 4px !important; border-radius: 0 !important;
color: #000; color: #000;
background: #F0F0F0; background: #5F9EA0;
} }
.chengdou-03__systerm .el-dialog .expand { .chengdou-01__systerm .el-dialog .expand {
width: 120px; width: 120px;
} }
.chengdou-03__systerm .el-dialog .el-button:focus span { .chengdou-01__systerm .el-dialog .el-button:focus span {
border: 1px dashed gray; border: 1px dashed #315253;
} }
.chengdou-03__systerm .el-dialog .el-button:active { .chengdou-01__systerm .el-dialog .el-button:active {
border: 2px inset #E2E2E2; border: 2px inset #B7D4D5;
} }
.chengdou-03__systerm .el-dialog .el-button:disabled { .chengdou-01__systerm .el-dialog .el-button:disabled {
border: 2px inset #E2E2E2; border: 2px inset #B7D4D5;
} }
.chengdou-03__systerm .el-dialog .el-button:disabled span { .chengdou-01__systerm .el-dialog .el-button:disabled span {
border: 0px; border: 0px;
} }
.chengdou-03__systerm .el-dialog .el-input { .chengdou-01__systerm .el-dialog .el-input {
border: 2px solid #F5F9F9; border-style:solid;
border-width: 1px;
border-color: #335658 #99C1C3 #99C1C3 #335658;
height: 22px !important; height: 22px !important;
line-height: 22px !important; line-height: 22px !important;
background: #5F9EA0; background: #5F9EA0;
} }
.chengdou-03__systerm .el-dialog .el-input__inner { .chengdou-01__systerm .el-dialog .el-input__inner {
color: #000; color: #000;
background: #5F9EA0 !important; background: #5F9EA0 !important;
border: 0px; border-style:solid;
border-width: 1px;
border-color: #467576 #A0C6C7 #A0C6C7 #467576;
border-radius: 0px !important; border-radius: 0px !important;
box-sizing: border-box; box-sizing: border-box;
height: 22px !important; height: 22px !important;
line-height: 22px !important; line-height: 22px !important;
} }
.chengdou-03__systerm .el-dialog .el-input.is-disabled .el-input__inner { .chengdou-01__systerm .el-dialog .el-input.is-disabled .el-input__inner {
background: #F0F0F0 !important; background: #F0F0F0 !important;
} }
.chengdou-03__systerm .el-dialog .el-textarea { .chengdou-01__systerm .el-dialog .el-textarea {
border: 2px solid #F5F9F9; border-style:solid;
border-width: 1px;
border-color: #335658 #99C1C3 #99C1C3 #335658;
border-radius: 0px; border-radius: 0px;
} }
.chengdou-03__systerm .el-dialog .el-textarea .el-textarea__inner { .chengdou-01__systerm .el-dialog .el-textarea .el-textarea__inner {
color: #000; color: #000;
background: #5F9EA0 !important; background: #5F9EA0 !important;
border: 0px; border-style:solid;
border-width: 1px;
border-color: #467576 #A0C6C7 #A0C6C7 #467576;
border-radius: 0px !important; border-radius: 0px !important;
box-sizing: border-box; box-sizing: border-box;
} }
.chengdou-03__systerm .el-dialog .el-textarea.is-disabled .el-textarea__inner { .chengdou-01__systerm .el-dialog .el-textarea.is-disabled .el-textarea__inner {
background: #F0F0F0 !important; background: #F0F0F0 !important;
} }
.chengdou-03__systerm .el-dialog .el-table--border th.gutter { .chengdou-01__systerm .el-dialog .el-table--border th.gutter {
background: #EBEADB !important; background: #EBEADB !important;
} }
.chengdou-03__systerm .el-dialog .el-table { .chengdou-01__systerm .el-dialog .el-table {
border: 2px inset #E9E9E9; border: 2px inset #E9E9E9;
color: #000 !important; color: #000 !important;
} }
.chengdou-03__systerm .el-dialog .el-table .cell { .chengdou-01__systerm .el-dialog .el-table .cell {
height: 22px; height: 22px;
line-height: 22px; line-height: 22px;
} }
.chengdou-03__systerm .el-dialog .el-table th.is-leaf { .chengdou-01__systerm .el-dialog .el-table th.is-leaf {
background: #F0F0F0 !important; background: #F0F0F0 !important;
border-right: 1px solid #BDBDBD !important; border-right: 1px solid #BDBDBD !important;
border-bottom: 1px solid #BDBDBD !important; border-bottom: 1px solid #BDBDBD !important;
@ -260,42 +263,42 @@ export default {
padding: 0px; padding: 0px;
} }
.chengdou-03__systerm .el-dialog .el-table tr td { .chengdou-01__systerm .el-dialog .el-table tr td {
height: 20px !important; height: 20px !important;
padding: 0px; padding: 0px;
} }
.chengdou-03__systerm .el-dialog .el-table .el-table__empty-text { .chengdou-01__systerm .el-dialog .el-table .el-table__empty-text {
top: 15px !important; top: 15px !important;
} }
.chengdou-03__systerm .el-dialog .current-row>td { .chengdou-01__systerm .el-dialog .current-row>td {
background: #3399FF !important; background: #3399FF !important;
color: #fff !important; color: #fff !important;
} }
.chengdou-03__systerm .el-dialog .el-checkbox__inner { .chengdou-01__systerm .el-dialog .el-checkbox__inner {
border: 1px inset #dcdfe6 !important; border: 1px inset #dcdfe6 !important;
} }
.chengdou-03__systerm .el-dialog .el-checkbox__label { .chengdou-01__systerm .el-dialog .el-checkbox__label {
color: #000 !important; color: #000 !important;
} }
.chengdou-03__systerm .el-dialog .el-checkbox.is-disabled .el-checkbox__inner { .chengdou-01__systerm .el-dialog .el-checkbox.is-disabled .el-checkbox__inner {
background: #E6E6E6 !important; background: #E6E6E6 !important;
} }
.chengdou-03__systerm .el-dialog .el-checkbox.is-disabled .el-checkbox__label { .chengdou-01__systerm .el-dialog .el-checkbox.is-disabled .el-checkbox__label {
color: #C5C9CC !important; color: #C5C9CC !important;
} }
.chengdou-03__systerm .el-dialog .el-checkbox__input.is-checked .el-checkbox__inner { .chengdou-01__systerm .el-dialog .el-checkbox__input.is-checked .el-checkbox__inner {
background: #fff !important; background: #fff !important;
border: 1px inset #dcdfe6 !important; border: 1px inset #dcdfe6 !important;
} }
.chengdou-03__systerm .el-dialog .el-checkbox__input.is-checked .el-checkbox__inner::after { .chengdou-01__systerm .el-dialog .el-checkbox__input.is-checked .el-checkbox__inner::after {
position: absolute; position: absolute;
-webkit-box-sizing: content-box; -webkit-box-sizing: content-box;
box-sizing: content-box; box-sizing: content-box;
@ -308,20 +311,20 @@ export default {
top: 1px; top: 1px;
} }
.chengdou-03__systerm .el-dialog .el-radio__inner { .chengdou-01__systerm .el-dialog .el-radio__inner {
border: 1px inset #dcdfe6 !important; border: 1px inset #dcdfe6 !important;
} }
.chengdou-03__systerm .el-dialog .el-radio__label { .chengdou-01__systerm .el-dialog .el-radio__label {
color: #000 !important; color: #000 !important;
} }
.chengdou-03__systerm .el-dialog .el-radio__input.is-checked .el-radio__inner { .chengdou-01__systerm .el-dialog .el-radio__input.is-checked .el-radio__inner {
background: #fff !important; background: #fff !important;
border: 1px inset #dcdfe6 !important; border: 1px inset #dcdfe6 !important;
} }
.chengdou-03__systerm .el-dialog .el-radio__input.is-checked .el-radio__inner::after { .chengdou-01__systerm .el-dialog .el-radio__input.is-checked .el-radio__inner::after {
width: 4px; width: 4px;
height: 4px; height: 4px;
border-radius: 100%; border-radius: 100%;
@ -331,54 +334,54 @@ export default {
top: 50%; top: 50%;
} }
.chengdou-03__systerm .el-dialog .el-radio.is-disabled .el-radio__inner { .chengdou-01__systerm .el-dialog .el-radio.is-disabled .el-radio__inner {
background: #E6E6E6 !important; background: #E6E6E6 !important;
} }
.chengdou-03__systerm .el-dialog .el-radio.is-disabled .el-radio__label { .chengdou-01__systerm .el-dialog .el-radio.is-disabled .el-radio__label {
color: #C5C9CC !important; color: #C5C9CC !important;
} }
.chengdou-03__systerm .el-dialog .base-label { .chengdou-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x); background: rgba(0, 0, 0, x);
position: relative; position: relative;
left: -15px; left: -15px;
top: -18px; top: -18px;
} }
.chengdou-03__systerm .el-dialog .el-form-item label { .chengdou-01__systerm .el-dialog .el-form-item label {
font-weight: normal !important; font-weight: normal !important;
color: #000 !important; color: #000 !important;
} }
.chengdou-03__systerm .el-dialog .context { .chengdou-01__systerm .el-dialog .context {
height: 100px; height: 100px;
border: 2px inset #E2E2E2; border: 2px inset #E2E2E2;
overflow-y: scroll; overflow-y: scroll;
} }
.chengdou-03__systerm .el-dialog .table { .chengdou-01__systerm .el-dialog .table {
margin-top: 10px; margin-top: 10px;
} }
.chengdou-03__systerm .el-dialog .notice { .chengdou-01__systerm .el-dialog .notice {
margin-left: 62px; margin-left: 62px;
line-height: 30px; line-height: 30px;
} }
.chengdou-03__systerm .el-dialog .button-group { .chengdou-01__systerm .el-dialog .button-group {
margin-top: 20px; margin-top: 20px;
} }
.chengdou-03__systerm.request_box .content-box .el-table__body-wrapper .el-table__row{ .chengdou-01__systerm.request_box .content-box .el-table__body-wrapper .el-table__row{
background: #000; background: #000;
height: 30px; height: 30px;
color: #518E86; color: #518E86;
} }
.chengdou-03__systerm.request_box .content-box .el-table__body-wrapper .el-table__row.hover-row td{ .chengdou-01__systerm.request_box .content-box .el-table__body-wrapper .el-table__row.hover-row td{
background: #d5ecf7; background: #d5ecf7;
} }
.chengdou-03__systerm.request_box .content-box .el-table__body-wrapper .el-table__row.current-row td{ .chengdou-01__systerm.request_box .content-box .el-table__body-wrapper .el-table__row.current-row td{
background: #d5ecf7; background: #d5ecf7;
} }

View File

@ -62,18 +62,7 @@
</template> </template>
</template> </template>
</div> </div>
<station-control-convert ref="stationControlConvert" />
<password-box ref="passwordBox" @setLoginResult="getLoginResult" />
<view-train-id ref="viewTrainId" />
<view-name ref="viewName" />
<view-device ref="viewDevice" />
<notice-info ref="noticeInfo" /> <notice-info ref="noticeInfo" />
<train-add ref="trainAdd" />
<train-transtalet ref="trainTranstalet" />
<train-delete ref="trainDelete" />
<manage-user ref="manageUser" />
<help-about ref="helpAbout" />
<set-limit-speed ref="setLimitSpeed" />
<system-login ref="systemLogin" /> <system-login ref="systemLogin" />
<system-logout ref="systemLogout" /> <system-logout ref="systemLogout" />
</div> </div>
@ -84,17 +73,6 @@ import { TrainingMode } from '@/scripts/ConstDic';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { State2SimulationMap } from '@/scripts/cmdPlugin/Config'; import { State2SimulationMap } from '@/scripts/cmdPlugin/Config';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import StationControlConvert from './menuDialog/stationControlConvert';
import TrainAdd from './menuDialog/trainAdd';
import TrainTranstalet from './menuDialog/trainTranstalet';
import TrainDelete from './menuDialog/trainDelete';
import PasswordBox from './menuDialog/passwordBox';
import ViewTrainId from './menuDialog/viewTrainId';
import ViewName from './menuDialog/viewName';
import ViewDevice from './menuDialog/viewDevice';
import ManageUser from './menuDialog/manageUser';
import HelpAbout from './menuDialog/helpAbout';
import SetLimitSpeed from './menuDialog/setLimitSpeed';
import SystemLogin from './menuDialog/systemLogin'; import SystemLogin from './menuDialog/systemLogin';
import SystemLogout from './menuDialog/systemLogout'; import SystemLogout from './menuDialog/systemLogout';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo'; import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
@ -104,17 +82,6 @@ export default {
name: 'MenuBar', name: 'MenuBar',
components: { components: {
NoticeInfo, NoticeInfo,
StationControlConvert,
PasswordBox,
ViewTrainId,
ViewName,
ViewDevice,
TrainAdd,
TrainTranstalet,
TrainDelete,
ManageUser,
HelpAbout,
SetLimitSpeed,
SystemLogin, SystemLogin,
SystemLogout SystemLogout
}, },

View File

@ -1,392 +0,0 @@
<template>
<div v-if="isShowBtn" class="menu" style="height: 45px;" :style="{left: point.x+'px', top: point.y+'px' }">
<button :id="Signal.arrangementRoute.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Signal.arrangementRoute.button.operation, 'Signal')">
<span style="color: black">
<center><b></b><b></b></center>
<center><b></b><b></b></center>
</span>
</button>
<button :id="Signal.cancelTrainRoute.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Signal.cancelTrainRoute.button.operation, 'Signal')">
<span style="color: black">
<center><b></b></center>
<center><b></b><b></b></center>
</span>
</button>
<button :id="Signal.guide.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Signal.guide.button.operation, 'Signal')">
<span style="color: black">
<center><b></b><b></b></center>
<center><b></b><b></b></center>
</span>
</button>
<!-- 流程未做暂不显示 -->
<!-- <button :id="Switch.guideLock.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Switch.guideLock.button.operation)">
<span style="color: red">
<center><b></b><b></b></center>
<center><b></b><b></b></center>
</span>
</button> -->
<button :id="Signal.humanTrainRoute.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Signal.humanTrainRoute.button.operation, 'Signal')">
<span style="color: red">
<center><b></b></center>
<center><b></b><b></b></center>
</span>
</button>
<button :id="Section.fault.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Section.fault.button.operation, 'Section')">
<span style="color: black">
<center><b></b></center>
<center><b></b><b></b></center>
</span>
</button>
<button :id="Switch.locate.button.domId" class="button_box" :style="{width: width+'px',backgroundColor:buttonUpColor}" @click="buttonDown(Switch.locate.button.operation, 'Switch')">
<span style="color: black">
<center><b></b><b></b></center>
<center><b></b><b></b></center>
</span>
</button>
<button :id="Switch.reverse.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Switch.reverse.button.operation, 'Switch')">
<span style="color: black">
<center><b></b><b></b></center>
<center><b></b><b></b></center>
</span>
</button>
<button :id="Switch.lock.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Switch.lock.button.operation, 'Switch')">
<span style="color: black">
<center><b></b><b></b></center>
<center><b></b><b></b></center>
</span>
</button>
<button :id="Switch.unlock.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Switch.unlock.button.operation, 'Switch')">
<span style="color: red">
<center><b></b><b></b></center>
<center><b></b><b></b></center>
</span>
</button>
<button :id="MixinCommand.block.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(MixinCommand.block.button.operation, 'MixinCommand')">
<span style="color: black">
<center><b></b></center>
<center><b></b></center>
</span>
</button>
<button :id="MixinCommand.unblock.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(MixinCommand.unblock.button.operation, 'MixinCommand')">
<span style="color: black">
<center><b></b></center>
<center><b></b></center>
</span>
</button>
<button :id="MixinCommand.functionButton.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(MixinCommand.functionButton.button.operation, 'MixinCommand')">
<span style="color: black">
<center>
<b style="color:deepskyblue"></b>
<b style="color:burlywood"></b>
</center>
<center>
<b style="color: red"></b>
<b style="color:forestgreen"></b>
</center>
</span>
</button>
<button :id="Signal.atsAutoControl.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Signal.atsAutoControl.button.operation, 'Signal')">
<span style="color: black">
<center><b></b></center>
<center><b></b><b></b></center>
</span>
</button>
<button :id="Signal.humanControl.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Signal.humanControl.button.operation, 'Signal')">
<span style="color: black">
<center><b></b></center>
<center><b></b><b></b></center>
</span>
</button>
<button :id="Command.cancel.clearMbm.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Command.cancel.clearMbm.operation)">
<span style="color: black">
<center><b></b></center>
<center><b></b></center>
</span>
</button>
<password-box ref="password" @checkOver="passWordCommit" />
</div>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
import Handler from '@/scripts/cmdPlugin/Handler';
// import { deepAssign } from '@/utils/index';
import PasswordBox from './dialog/childDialog/passwordInputBox.vue';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'MapButtonMenu',
components: {
PasswordBox
},
data() {
return {
point: {
x: -1000,
y: -1000
},
operation: '0',
buttonName: '',
buttonDownColor: '#A8A8A8',
buttonUpColor: '#DCDCDC',
width: 58,
tempData: null,
offset: {},
commandType: '',
cmdTypeList: []
};
},
computed: {
Switch() {
return OperationEvent.Switch;
},
Section() {
return OperationEvent.Section;
},
Signal() {
return OperationEvent.Signal;
},
MixinCommand() {
return OperationEvent.MixinCommand;
},
Command() {
return OperationEvent.Command;
},
isShowBtn() {
return this.$store.state.training.prdType == '01';
},
CMD() {
return CMD;
},
cmdType() {
switch (this.operation) {
case this.Switch.lock.button.operation: //
return CMD.Switch.CMD_SWITCH_SINGLE_LOCK;
case this.Switch.unlock.button.operation: //
return CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK;
case this.Switch.locate.button.operation || this.Switch.reverse.button.operation: // /
return CMD.Switch.CMD_SWITCH_TURN;
case this.MixinCommand.block.button.operation: //
return {};
case this.MixinCommand.unblock.button.operation: //
return {};
case this.Signal.atsAutoControl.button.operation: //
return CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING;
case this.Signal.humanControl.button.operation: //
return CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING;
case this.Section.fault.button.operation: //
return CMD.Section.CMD_SECTION_FAULT_UNLOCK;
case this.Signal.humanTrainRoute.button.operation: // ()
return CMD.Section.CMD_SIGNAL_HUMAN_RELEASE_ROUTE;
case this.Signal.cancelTrainRoute.button.operation: //
return CMD.Section.CMD_SIGNAL_CANCEL_ROUTE;
case this.Signal.arrangementRoute.button.operation: //
return CMD.Section.CMD_SIGNAL_SET_ROUTE;
case this.Signal.guide.button.operation: //
return CMD.Section.CMD_SIGNAL_ROUTE_GUIDE;
}
return '';
}
},
watch: {
'$store.state.config.canvasOffsetCount': function (val) {
this.resetPosition();
},
'$store.state.menuOperation.buttonOperation': function (val, old) {
this.updateButtonShow(val, old);
},
'$store.state.menuOperation.selectedCount': function (val) {
this.selectedChange();
}
},
mounted() {
this.resetPosition();
},
methods: {
passWordCommit(data) {
const operate = {
type: 'mbm',
operation: data.operateNext
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
},
resetPosition() {
this.$nextTick(() => {
const canvasOffset = this.$store.state.config.canvasOffset;
this.point = {
x: canvasOffset.x + 20,
y: canvasOffset.y + this.$store.state.config.height - 65
};
this.$store.dispatch('training/tipReload');
});
},
updateButtonShow(val, old) {
if (old) {
//
const domId = OperationHandler.getDomIdByOperation(old);
const dom = document.getElementById(domId);
if (dom) {
dom.disabled = false;
dom.style.backgroundColor = this.buttonUpColor;
}
}
if (val) {
//
const domId = OperationHandler.getDomIdByOperation(val);
const dom = document.getElementById(domId);
if (dom) {
dom.disabled = true;
dom.style.backgroundColor = this.buttonDownColor;
}
}
},
buttonDown(operation, commandType) {
if (operation != this.Command.cancel.clearMbm.operation) {
const operate = {
type: 'mbm',
operation: operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.operation = operation;
this.commandType = commandType;
if (this.commandType == 'MixinCommand') {
this.cmdTypeList = ['Switch', 'Signal'];
} else {
this.cmdTypeList = [commandType];
}
this.$store.dispatch('menuOperation/setButtonOperation', operation); //
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (operation == this.Signal.humanTrainRoute.button.operation) { //
operate['operateNext'] = this.Command.close.password.operation;
this.$refs.password.doShow(operate);
} else if (operation == this.Section.fault.button.operation) { //
operate['operateNext'] = this.Command.close.password.operation;
this.$refs.password.doShow(operate);
} else if (operation == this.Switch.unlock.button.operation) { //
operate['operateNext'] = this.Command.close.password.operation;
this.$refs.password.doShow(operate);
} else if (operation == this.MixinCommand.unblock.button.operation) { //
operate['operateNext'] = this.Command.close.password.operation;
this.$refs.password.doShow(operate);
}
this.$store.dispatch('training/emitTipFresh');
}
});
} else {
const operate = {
start: true,
type: 'mbm',
operation: operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.commandType = '';
this.$store.dispatch('menuOperation/setButtonOperation', null);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
Handler.clear(); //
}
});
}
},
selectedChange() {
//
if (this.$store.state.menuOperation.buttonOperation) {
const model = this.$store.state.menuOperation.selected; //
if (model._type) {
const operate = this.handelOperate(model);
if (this.cmdTypeList.indexOf(model._type) >= 0) {
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
if (valid) {
if (this.operation == this.Signal.guide.button.operation) { //
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
operate['operateNext'] = this.Command.close.password.operation;
this.operation = '0';
this.$refs.password.doShow(operate);
}
}
});
} else {
Handler.clear(); //
this.$store.dispatch('menuOperation/setButtonOperation', null);
}
} else {
Handler.clear(); //
this.$store.dispatch('menuOperation/setButtonOperation', null);
}
}
},
handelOperate(model) { // operate
const operate = {
send: true,
operation: this.$store.state.menuOperation.buttonOperation,
cmdType: this.cmdType,
param: {}
};
switch (this.commandType) {
case 'Switch':
operate.param['Switch_Code'] = model.code;
break;
case 'Signal':
operate.param['Signal_Code'] = model.code;
break;
case 'Section':
operate.param['Section_Code'] = model.code;
break;
case 'MixinCommand':
if (model._type == 'Switch') {
if (this.operation == this.MixinCommand.block.button.operation) {
operate.cmdType = CMD.Switch.CMD_SWITCH_BLOCK;
} else if (this.operation == this.MixinCommand.unblock.button.operation) {
operate.cmdType = CMD.Switch.CMD_SWITCH_UNBLOCK;
}
operate.param['Switch_Code'] = model.code;
} else if (model._type == 'Signal') {
if (this.operation == this.MixinCommand.block.button.operation) {
operate.cmdType = CMD.Signal.CMD_SIGNAL_BLOCK;
} else if (this.operation == this.MixinCommand.unblock.button.operation) {
operate.cmdType = CMD.Signal.CMD_SIGNAL_UNBLOCK;
}
operate.param['Signal_Code'] = model.code;
}
break;
}
return operate;
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
$bg: #fff;
$hoverBg: #f5f7fa;
.button_box{
display: block;
float: left;
}
.menu {
background-color: $bg;
position: fixed;
border: 1px solid gray;
z-index: 10;
display: block;
.dsp-block {
display: block;
text-align: center;
border-radius: unset;
width: 100%;
}
.dsp-block:hover {
background-color: $hoverBg;
}
}
</style>

View File

@ -1,131 +0,0 @@
<template>
<el-dialog class="chengdou-03__systerm manage-user" :title="title" :visible.sync="show" width="600px" :before-close="doClose"
:zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<div style="height: 70px;">
<div style="position: relative; left: 10px;">
</div>
<div style="position: relative; left: 80px;">
<div style="width:100%">
<span style="padding-left: 60px">ControlMonitor 1.3.5.0</span>
<el-button style="position: absolute; right: 95px;" :id="domIdConfirm" type="primary"
:loading="loading" @click="commit">确定</el-button>
</div>
<div style="width:100%; padding-top: 20px">
<span> 版权所有C2010-2011 北京玖琏科技有限公司</span>
</div>
</div>
</div>
<div style="padding: 10px; margin: 5px; ">
<el-table :data="tableData" style="width: 100%;" height="400">
<el-table-column prop="moduleName" label="模块名称" width="180">
</el-table-column>
<el-table-column prop="version" label="版本" width="180">
</el-table-column>
<el-table-column prop="updateDate" label="修改日期">
</el-table-column>
</el-table>
</div>
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'ManageUser',
data() {
return {
tableData: [
{
moduleName: '主程序版本:',
version: '123',
updateDate: '123'
}
],
operate: {},
operation: null,
dialogShow: false,
loading: false,
selected: null,
}
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.close.menu.domId : '';
},
title() {
return '关于ControlMonitor'
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate) {
//
if (!this.dialogShow) {
this.loading = false;
this.operate = operate || {};
this.operation = operate.operation;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
let operate = {
type: this.operate.type,
operation: OperationEvent.Command.close.menu.operation,
}
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
})
},
cancel() {
let operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => { this.doClose(); });
}
}
}
</script>
<style scoped>
.chengdou-03__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -10px;
padding: 0 5px;
background-color: #F0F0F0;
}
</style>

View File

@ -1,135 +0,0 @@
<template>
<el-dialog class="chengdou-03__systerm stand-stop-time" :title="title" :visible.sync="show" width="320px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<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="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'TrainAdd',
components: {
},
data() {
return {
trainNoList: [],
addModel: {
},
rules: {
// groupNumber: [
// { required: true, message: '', trigger: 'blur' }
// ],
// stationStandCode: [
// { required: true, message: '', trigger: 'change' }
// ],
},
operation: null,
dialogShow: false,
loading: false,
}
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.planTrain.addPlanTrain.domId : '';
},
title() {
return '设置限速'
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate) {
this.operate = operate || {};
this.operation = operate.operation;
if (!this.dialogShow) {
this.loading = false;
}
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.$refs['form'].validate((valid) => {
if (valid) {
let operate = {
send: true,
operation: OperationEvent.Command.planTrain.addPlanTrain.operation,
}
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
} else {
// this.$refs.noticeInfo.doShow(operate);
}
}).catch(error => {
this.loading = false;
this.doClose();
// this.$refs.noticeInfo.doShow(operate);
})
} else {
return false;
}
});
},
cancel() {
let operate = {
operation: OperationEvent.Command.cancel.menu.operation,
}
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => { this.doClose(); });
}
}
}
</script>
<style scoped>
.chengdou-03__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -18px;
padding: 0 5px;
background-color: #F0F0F0;
}
</style>

View File

@ -1,290 +0,0 @@
<template>
<el-dialog class="chengdou-03__systerm manage-user" :title="title" :visible.sync="show" width="420px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<div style="padding: 5px 5px; border: 1px double lightgray; margin: 20px 0px; ">
<span class="base-label">用户列表</span>
<el-row>
<el-col :span="18">
<el-table ref="multipleTable" :data="tableData" border row-key="code" style="width: 100%"
height="450" center size="mini" highlight-current-row @row-click="chooseUser">
<el-table-column prop="jobNumber" label="工号" width="120">
<template slot-scope="scope">
<span>{{scope.row.jobNumber}}</span>
</template>
</el-table-column>
<el-table-column prop="userName" label="用户名">
<template slot-scope="scope">
<span>{{scope.row.userName}}</span>
</template>
</el-table-column>
<el-table-column width="20">
</el-table-column>
</el-table>
</el-col>
<el-col :span="4">
<el-button style="margin-top: 140px; margin-left: 10px;" :id="domIdFreshUser" @click="freshUser">刷新
</el-button>
<el-button style="margin-top: 30px; margin-left: 10px;" :id="domIdAddUser" @click="addUser">增加
</el-button>
<el-button style="margin-top: 30px; margin-left: 10px;" :id="domIdEditUser" @click="editUser">修改
</el-button>
<el-button style="margin-top: 30px; margin-left: 10px;" :id="domIdDelUser" @click="delUser">删除
</el-button>
</el-col>
</el-row>
</div>
<el-row justify="center" class="button-group">
<el-col :span="8" :offset="6">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="0">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<user-add ref="userAdd" @operateUser="operateUser"></user-add>
<user-edit ref="userEdit" @operateUser="operateUser"></user-edit>
<user-delete ref="userDelete" @operateUser="operateUser"></user-delete>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import UserAdd from './childDialog/userAdd';
import UserEdit from './childDialog/userEdit';
import UserDelete from './childDialog/userDelete';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'ManageUser',
components: {
UserAdd,
UserEdit,
UserDelete
},
data() {
return {
tableData: [],
operate: {},
operation: null,
dialogShow: false,
loading: false,
selected: null,
}
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdAddUser() {
return this.dialogShow ? OperationEvent.Command.manage.addUser.domId : '';
},
domIdEditUser() {
return this.dialogShow ? OperationEvent.Command.manage.editUser.domId : '';
},
domIdDelUser() {
return this.dialogShow ? OperationEvent.Command.manage.delUser.domId : '';
},
domIdFreshUser() {
return this.dialogShow ? OperationEvent.Command.manage.freshUser.domId : '';
},
domIdChooseUser() {
return this.dialogShow ? OperationEvent.Command.manage.chooseUser.domId : '';
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.close.menu.domId : '';
},
title() {
return '用户管理'
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate) {
//
if (!this.dialogShow) {
this.loading = false;
this.operate = operate || {};
this.operation = operate.operation;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
//
addUser() {
let operate = {
type: this.operate.type,
operation: OperationEvent.Command.manage.addUser.operation,
}
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.$refs.userAdd.doShow(operate);
}
}).catch(error => {
this.loading = false;
})
},
//
editUser() {
if (this.selected) {
let operate = {
type: this.operate.type,
operation: OperationEvent.Command.manage.editUser.operation,
}
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.$refs.userEdit.doShow(operate, this.selected);
}
}).catch(error => {
this.loading = false;
})
} else {
this.$messageBox('请先选择用户');
}
},
//
delUser() {
if (this.selected) {
let operate = {
type: this.operate.type,
operation: OperationEvent.Command.manage.delUser.operation,
messages: [`你确定删除用户${this.selected.userName}吗?`]
}
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.$refs.userDelete.doShow(operate, this.selected);
}
}).catch(error => {
this.loading = false;
})
} else {
this.$messageBox('请先选择用户');
}
},
//
freshUser() {
let operate = {
type: this.operate.type,
operation: OperationEvent.Command.manage.freshUser.operation,
}
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
}).catch(error => {
this.loading = false;
})
},
//
chooseUser(row) {
let operate = {
type: this.operate.type,
operation: OperationEvent.Command.manage.chooseUser.operation,
}
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
this.selected = row;
}).catch(error => {
this.loading = false;
})
},
commit() {
let operate = {
type: this.operate.type,
operation: OperationEvent.Command.close.menu.operation,
}
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
})
},
cancel() {
let operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => { this.doClose(); });
},
//
operateUser(data) {
if (data && data.type === 'ADD') {
let index = this.tableData.indexOf(this.tableData.find(elem => { return elem.jobNumber === data.jobNumber }));
if (index < 0) {
this.tableData.push({
jobNumber: data.jobNumber,
userName: data.userName,
password: data.password
});
} else {
this.$messageBox('添加失败,存在相同工号的用户');
}
} else if (data && data.type === 'EDIT') {
let index = this.tableData.indexOf(this.tableData.find(elem => { return elem.jobNumber === data.jobNumber }));
if (index >= 0) {
this.tableData[index].password = data.password;
this.tableData[index].userName = data.userName;
} else {
this.$messageBox('修改失败');
}
} else if (data && data.type === 'DELETE') {
let index = this.tableData.indexOf(this.tableData.find(elem => { return elem.jobNumber === data.jobNumber }));
if (index >= 0) {
this.tableData.splice(index, 1);
} else {
this.$messageBox('删除失败');
}
}
}
}
}
</script>
<style scoped>
.chengdou-03__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -10px;
padding: 0 5px;
background-color: #F0F0F0;
}
</style>

View File

@ -1,222 +0,0 @@
<template>
<el-dialog class="chengdou-03__systerm password-box" title="密码框" :visible.sync="show" width="320px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<div class="context" style="overflow:hidden">
<el-form label-width="80px" size="mini">
<el-form-item prop="username">
<span slot="label">用户名</span>
<el-input v-model="model.username" disabled></el-input>
</el-form-item>
<el-form-item prop="password">
<span slot="label">&emsp;</span>
<el-input type="password" v-model="model.password"></el-input>
</el-form-item>
</el-form>
<div class="operate">
<el-button-group class="left" v-model="key" size="mini">
<el-button size="mini" @click="click(1)">1</el-button>
<el-button size="mini" @click="click(2)">2</el-button>
<el-button size="mini" @click="click(3)">3</el-button>
<el-button size="mini" @click="click(4)">4</el-button>
<el-button size="mini" @click="click(5)">5</el-button>
</el-button-group>
<el-button-group class="right" v-model="key" size="mini">
<el-button @click="esc">回退</el-button>
</el-button-group>
<el-button-group class="left" v-model="key" size="mini">
<el-button size="mini" @click="click(6)">6</el-button>
<el-button size="mini" @click="click(7)">7</el-button>
<el-button size="mini" @click="click(8)">8</el-button>
<el-button size="mini" @click="click(9)">9</el-button>
<el-button size="mini" @click="click(0)">0</el-button>
</el-button-group>
<el-button-group class="right" v-model="key" size="mini">
<el-button @click="clr">清空</el-button>
</el-button-group>
</div>
</div>
<el-row class="button-group">
<el-col :span="6" :offset="4">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="6" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo"></notice-info>
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
export default {
name: 'PasswordBox',
data() {
return {
dialogShow: false,
loading: false,
operate: null,
operation: null,
model: {
username: '',
password: '',
},
key: ''
}
},
components: {
NoticeInfo
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.close.password.domId : '';
},
domIdConfirm() {
if (this.dialogShow) {
if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl)) {
/** 强制站控*/
return OperationEvent.StationControl.forcedStationControl.passwordConfirm.domId;
}
}
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
loadInitData(operate) {
this.model.username = '';
this.model.password = '';
this.operate = operate || {};
this.operation = operate.operation;
this.model.username = this.$store.state.user.name;
},
doShow(operate) {
/** 如果不是断点激活,而是第一次显示需要初始化数据*/
if (!this.dialogShow) {
this.loadInitData(operate);
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
cancel() {
let operate = {
type: this.operate.type,
operation: OperationEvent.Command.close.password.operation,
}
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
})
},
commit() {
let operate = {
type: this.operate.type,
}
if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl)) {
/** 强制站控*/
operate.operation = OperationEvent.StationControl.forcedStationControl.passwordConfirm.operation
}
if (this.model.password == '123456') {
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {
this.$emit('setLoginResult', {
operation: operate.operation,
success: valid
});
this.doClose();
}
}).catch(() => {
this.loading = false;
this.$emit('setLoginResult', {
operation: operate.operation,
success: false
});
})
} else {
this.$refs.noticeInfo.doShow(operate, ['密码输入错误!']);
}
},
click(key) {
if (!this.model.password) {
this.model.password = '';
}
this.model.password += key;
},
esc() {
if (this.model.password) {
this.model.password = this.model.password.substring(0, this.model.password.length - 1);
}
},
clr() {
this.model.password = '';
}
}
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.password-box .el-form {
margin-top: 10px !important;
margin-right: 20px !important;
}
.password-box .el-form-item {
margin-bottom: 5px !important;
}
.password-box .context {
height: 170px !important;
}
.password-box .operate {
margin-top: 10px !important;
padding-bottom: 10px !important;
}
.password-box .left {
margin-left: 10px !important;
}
.password-box .left .el-button {
color: #000;
background: #F0F0F0;
text-align: center;
width: 30px !important;
}
.password-box .right {
color: #000;
margin-left: 10px !important;
background: #F0F0F0;
width: 80px !important;
}
</style>

View File

@ -1,7 +1,7 @@
<template> <template>
<el-dialog <el-dialog
v-dialogDrag v-dialogDrag
class="chengdou-03__systerm stand-stop-time" class="chengdou-01__systerm stand-stop-time"
:title="title" :title="title"
:visible.sync="show" :visible.sync="show"
width="500px" width="500px"

View File

@ -1,275 +0,0 @@
<template>
<el-dialog class="chengdou-03__systerm stand-stop-time" :title="title" :visible.sync="show" width="800px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-row>
<el-col :span="14">
<div class="card-box">
<span class="tip-label">请求</span>
<el-row style="margin: 5px">
<el-col :span="6" class="item-label">线路选择</el-col>
<el-col :span="6">
<el-select v-model="data.path">
<el-option v-for="item in pathList" :key="item.value" :label="item.name"
:value="item.value">
</el-option>
</el-select>
</el-col>
<el-col :span="6" class="item-label">限制速度</el-col>
<el-col :span="6">
<el-select v-model="data.speed">
<el-option v-for="item in speedList" :key="item.value" :label="item.name"
:value="item.value">
</el-option>
</el-select>
</el-col>
</el-row>
<el-row>
<el-col :span="6" class="item-label">起始公里标</el-col>
<el-col :span="6">
<el-input v-model="data.begKmPost"></el-input>
</el-col>
<el-col :span="6" class="item-label">结束公里标</el-col>
<el-col :span="6">
<el-input v-model="data.endKmPost"></el-input>
</el-col>
</el-row>
<el-row>
<el-col :span="6" class="item-label">限速区段长度</el-col>
<el-col :span="6">
<el-input v-model="data.length"></el-input>
</el-col>
<el-col :span="3">
<el-button>查看</el-button>
</el-col>
<el-col :span="3">
<el-button>请求</el-button>
</el-col>
</el-row>
</div>
<div class="card-box">
<span class="tip-label">执行</span>
<el-row style="margin: 5px">
<el-col :span="6" class="item-label">线路选择</el-col>
<el-col :span="6">
<el-select v-model="form.path">
<el-option v-for="item in pathList" :key="item.value" :label="item.name"
:value="item.value">
</el-option>
</el-select>
</el-col>
<el-col :span="6" class="item-label">限制速度</el-col>
<el-col :span="6">
<el-select v-model="form.speed">
<el-option v-for="item in speedList" :key="item.value" :label="item.name"
:value="item.value">
</el-option>
</el-select>
</el-col>
</el-row>
<el-row>
<el-col :span="6" class="item-label">起始公里标</el-col>
<el-col :span="6">
<el-input v-model="form.begKmPost"></el-input>
</el-col>
<el-col :span="6" class="item-label">结束公里标</el-col>
<el-col :span="6">
<el-input v-model="form.endKmPost"></el-input>
</el-col>
</el-row>
<el-row>
<el-col :span="6" class="item-label">限速区段长度</el-col>
<el-col :span="6">
<el-input v-model="form.length"></el-input>
</el-col>
<el-col :span="3">
<el-button>查看</el-button>
</el-col>
<el-col :span="3">
<el-button>请求</el-button>
</el-col>
</el-row>
</div>
<div class="card-box">
<span class="tip-label">操作提示</span>
11111113
</div>
</el-col>
<el-col :span="9" :offset="1">
<div class="card-box">
<span class="tip-label">设备列表</span>
<el-table class="card-table" :data="deviceData" border style="width: 100%" height="300">
<el-table-column prop="stationName" label="站名">
</el-table-column>
<el-table-column prop="deviceCode" label="设备号">
</el-table-column>
<el-table-column prop="deviceName" label="设备名">
</el-table-column>
</el-table>
</div>
</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="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'TrainAdd',
components: {
},
data() {
return {
operation: null,
dialogShow: false,
loading: false,
data: {
path: '',
speed: '',
begKmPost: '',
endKmPost: '',
length: '',
},
form: {
path: '',
speed: '',
begKmPost: '',
endKmPost: '',
length: '',
},
pathList: [
{ name: '上行站线', value: '01' },
{ name: '下行站线', value: '02' }
],
speedList: [
{ name: '10Km/h', value: '10' },
{ name: '15Km/h', value: '15' },
{ name: '20Km/h', value: '20' },
{ name: '25Km/h', value: '25' },
],
deviceData: []
}
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.planTrain.addPlanTrain.domId : '';
},
title() {
return '设置临时限速'
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate) {
this.operate = operate || {};
this.operation = operate.operation;
if (!this.dialogShow) {
this.loading = false;
}
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.$refs['form'].validate((valid) => {
if (valid) {
let operate = {
send: true,
operation: OperationEvent.Command.planTrain.addPlanTrain.operation,
}
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
} else {
// this.$refs.noticeInfo.doShow(operate);
}
}).catch(error => {
this.loading = false;
this.doClose();
// this.$refs.noticeInfo.doShow(operate);
})
} else {
return false;
}
});
},
cancel() {
let operate = {
operation: OperationEvent.Command.cancel.menu.operation,
}
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => { this.doClose(); });
}
}
}
</script>
<style scoped>
.chengdou-03__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -18px;
padding: 0 5px;
background-color: #F0F0F0;
}
.card-box {
border: 1px solid #c0c0c0;
margin-bottom: 20px;
}
.card-table {
position: relative;
top: -15px;
}
.tip-label {
position: relative;
left: 5px;
top: -15px;
background: #ECE9D8;
}
.item-label {
text-align: center;
}
</style>

View File

@ -1,433 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm station-control-convert"
title="控制模式转换"
:visible.sync="show"
width="700px"
:before-close="doClose"
:show-close="true"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-table
ref="multipleTable"
:data="tableData"
border
row-key="code"
style="width: 100%"
height="250"
center
size="mini"
highlight-current-row
>
<el-table-column :id="domIdChoose" prop="check" label="选择" width="60" style="margin-left:30px">
<template slot-scope="scope">
<el-checkbox ref="check" v-model="scope.row.check" :disabled="scope.row.disabled" />
</template>
</el-table-column>
<el-table-column prop="operate" label="操作区域" width="140">
<template slot-scope="scope">
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.operate }}</span>
</template>
</el-table-column>
<el-table-column prop="control" label="控制模式" width="80">
<template slot-scope="scope">
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.control }}</span>
</template>
</el-table-column>
<el-table-column prop="status" label="中心-车站通信状态" width="140">
<template slot-scope="scope">
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.status }}</span>
</template>
</el-table-column>
<el-table-column prop="result" label="转换执行状态">
<template slot-scope="scope">
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.result }}</span>
</template>
</el-table-column>
</el-table>
<el-row class="button-group">
<el-col :span="10" :offset="3">
<el-button v-if="isFork" :id="domIdFork" :disabled="disabledCommit" @click="forkCommit">强制站控</el-button>
<el-button v-if="isRequest" :id="domIdRequest" :disabled="disabledCommit" @click="requestCommit">请求站控
</el-button>
<el-button v-if="isConter" :id="domIdConter" :disabled="disabledCommit" @click="conterCommit">请求中控
</el-button>
</el-col>
<el-col :span="6" :offset="4">
<el-button :id="domIdCancel" :disabled="disabledClose" @click="cancel">关闭</el-button>
</el-col>
</el-row>
<two-confirmation ref="twoConfirmation" @setOperate="getOperate" />
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { TrainingMode } from '@/scripts/ConstDic';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
import TwoConfirmation from './childDialog/twoConfirmation';
export default {
name: 'StationControlConvert',
components: {
TwoConfirmation
},
data() {
return {
operate: null,
dialogShow: false,
disabledSend: false,
disabledSure: false,
disabledClose: false,
operation: '',
controlProps: {
'01': '中控',
'02': '站控'
},
selection: [],
tableData: [],
timer: null,
count: 0,
backOperate: '',
timeout: 61
};
},
computed: {
...mapGetters('map', [
'stationList'
]),
...mapGetters('training', [
'mode',
'started'
]),
disabledCommit() {
return this.disabledSend || this.disabledSure;
},
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
isFork() {
if (this.dialogShow) {
return OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl);
}
},
isRequest() {
if (this.dialogShow) {
return OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestStationControl);
}
},
isConter() {
if (this.dialogShow) {
return OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl);
}
},
domIdChoose() {
if (this.dialogShow) {
if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl)) {
return OperationEvent.StationControl.forcedStationControl.choose.domId;
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestStationControl)) {
return OperationEvent.StationControl.requestStationControl.choose.domId;
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)) {
return OperationEvent.StationControl.requestCentralControl.choose.domId;
}
}
},
domIdConter() {
return this.dialogShow ? OperationEvent.StationControl.requestCentralControl.menu.domId : '';
},
domIdFork() {
return this.dialogShow ? OperationEvent.StationControl.forcedStationControl.menu.domId : '';
},
domIdRequest() {
return this.dialogShow ? OperationEvent.StationControl.requestStationControl.menu.domId : '';
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
}
},
watch: {
'$store.state.socket.msgHead': function (elem) {
if (elem) {
if (elem.hasOwnProperty('timeout')) {
this.updateTableValue(elem.stationControlCode, { result: `接受转换应答超时` }, false);
} else if (elem.hasOwnProperty('success')) {
if (elem.success) {
this.updateTableValue(elem.stationControlCode, { result: '控制模式转换成功' }, true);
} else {
this.updateTableValue(elem.stationControlCode, { result: `控制模式转换失败` }, false);
}
}
}
},
backOperate: function (operate) {
if (this.dialogShow && operate) {
if (operate.selection && operate.selection.length) {
operate.selection.forEach(elem => {
if (operate.commit) {
this.updateTableValue(elem.code, { result: `已发送转换请求,${this.timeout}秒后超时.` }, false);
} else if (operate.cancel) {
this.updateTableValue(elem.code, { result: '' }, false);
}
});
}
}
},
//
tableData: {
handler(val, oldVal) {
this.checkTableDataSelction(val);
},
deep: true
}
},
mounted() {
this.loadTableData();
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
updateTableValue(code, result, success) {
this.tableData.forEach((row, index) => {
if (row.code == code) {
for (const prop in result) {
row[prop] = result[prop];
}
if (success) {
if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl) || OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestStationControl)) {
row.control = this.controlProps['02']; // 01: 02:
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)) {
row.control = this.controlProps['01']; // 01: 02:
}
row.disabled = true;
row.check = false;
}
}
});
},
checkTableDataSelction(data) {
const selection = [];
if (data && data.length > 0) {
data.forEach(row => {
if (row.check && !row.disabled) {
selection.push(row);
}
});
}
this.disabledSend = !selection.length;
if (JSON.stringify(selection) !== JSON.stringify(this.selection)) {
this.handleChooseChange(selection);
this.selection = selection;
}
},
checkBoxDisabled(row) {
const control = (this.$store.getters('map/getDeviceByCode')(row.code) || {});
if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl) || OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestStationControl)) {
if (control && control.status == '02') { // 01: 02:
return true;
}
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)) {
if (control && control.status == '01') { // 01: 02:
return true;
}
}
},
loadTableData() {
this.tableData = [];
this.stationList.forEach(station => {
// const station = this.$store.getters['map/getDeviceByCode'](control.stationCode);
this.tableData.push({
code: station.code,
operate: station.name || '',
control: '',
check: false,
disabled: false,
status: '正常',
result: ''
});
});
},
initTableDataStatus() {
this.tableData.forEach(row => {
row.disabled = this.checkBoxDisabled(row);
row.check = false;
row.result = '';
const control = (this.$store.getters('map/getDeviceByCode')(row.code) || {}).state;
if (control) {
row.control = this.controlProps[control.status];
}
});
},
doShow(operate) {
if (!this.dialogShow) {
this.operate = operate || {};
this.operation = operate.operation;
this.disabledSure = false;
this.initTableDataStatus();
}
this.dialogShow = true;
this.$store.dispatch('training/emitTipFresh');
},
doClose() {
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.$refs.multipleTable.setCurrentRow();
},
cancel() {
const operate = {
type: 'bar',
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
});
},
clearTimer() {
this.count = 0;
if (this.timer) {
clearInterval(this.timer);
this.timer = null;
}
},
serializeCodeListWithSeparator(sep) {
const codeList = [];
if (this.selection && this.selection.length) {
this.selection.forEach(elem => {
codeList.push(elem.code);
});
}
return codeList.join(sep);
},
handleChooseChange(selection) {
this.selection = selection;
if (selection && selection.length) {
const operate = {
operation: '',
val: this.serializeCodeListWithSeparator('::'),
selection: selection
};
if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl)) {
operate.operation = OperationEvent.StationControl.forcedStationControl.choose.operation;
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestStationControl)) {
operate.operation = OperationEvent.StationControl.requestStationControl.choose.operation;
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)) {
operate.operation = OperationEvent.StationControl.requestCentralControl.choose.operation;
}
this.disabledSure = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.disabledSure = false;
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
} else if (!selection) {
this.$messageBox('请选择一条数据');
}
},
requestCommit() {
const operate = {
messages: ['确认将如下操作区域的控制模式由中控转为站控:'],
operation: OperationEvent.StationControl.requestStationControl.menu.operation,
val: this.serializeCodeListWithSeparator('::'),
selection: this.selection
};
this.selection.forEach((elem, index) => {
operate.messages.push(`操作区域${index + 1}:${elem.operate}`);
});
this.disabledSure = true;
this.disabledClose = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.twoConfirmation.doShow(operate);
} else {
this.disabledSure = false;
}
}).catch((error) => {
this.disabledSure = false;
this.disabledClose = false;
});
},
forkCommit() {
const operate = {
messages: ['确认将如下操作区域的控制模式由中控转为站控:'],
operation: OperationEvent.StationControl.forcedStationControl.menu.operation,
val: this.serializeCodeListWithSeparator('::'),
selection: this.selection
};
this.selection.forEach((elem, index) => {
operate.messages.push(`操作区域${index + 1}:${elem.operate}`);
});
this.disabledSure = true;
this.disabledClose = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.twoConfirmation.doShow(operate);
} else {
this.disabledSure = false;
}
}).catch(() => {
this.disabledSure = false;
this.disabledClose = false;
});
},
conterCommit() { //
const operate = {
messages: ['确认将如下操作区域的控制模式由站控转为中控:'],
operation: OperationEvent.StationControl.requestCentralControl.menu.operation,
val: this.serializeCodeListWithSeparator('::'),
selection: this.selection
};
this.selection.forEach((elem, index) => {
operate.messages.push(`操作区域${index + 1}:${elem.operate}`);
});
this.disabledSure = true;
this.disabledClose = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.twoConfirmation.doShow(operate);
} else {
this.disabledSure = false;
}
}).catch(() => {
this.disabledSure = false;
this.disabledClose = false;
});
},
getOperate(operate) {
this.backOperate = operate;
if (operate.cancel) {
this.disabledClose = false;
this.disabledSure = this.disabledSend = false;
}
if (operate.commit || operate.timeout) {
this.disabledSend = this.disabledSure = true;
this.disabledClose = false;
}
}
}
};
</script>

View File

@ -1,7 +1,7 @@
<template> <template>
<el-dialog <el-dialog
v-dialogDrag v-dialogDrag
class="chengdou-03__systerm stand-stop-time" class="chengdou-01__systerm stand-stop-time"
:title="title" :title="title"
:visible.sync="show" :visible.sync="show"
width="400px" width="400px"
@ -13,10 +13,10 @@
<el-form ref="form" size="small" label-width="0" :model="addModel" :rules="rules"> <el-form ref="form" size="small" label-width="0" :model="addModel" :rules="rules">
<el-row> <el-row>
<el-col :span="7"> <el-col :span="7">
<div style="text-align: center;">用户名</div> <div style="text-align: center; color: #000">用户名</div>
</el-col> </el-col>
<el-col :span="7" :offset="10"> <el-col :span="7" :offset="10">
<div style="text-align: center;">密码</div> <div style="text-align: center; color: #000">密码</div>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
@ -32,12 +32,12 @@
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<div style="text-align: center;">用户角色</div> <div style="text-align: center; color: #000">用户角色</div>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12" :offset="6"> <el-col :span="12" :offset="6">
<el-form-item prop="role"> <el-form-item prop="role" style="border-width:1px; border-style: solid; border-color: #365B5C #8DBABC #8DBABC #365B5C ">
<div style="box-shadow: 0 2px 4px rgba(0, 0, 0, .12);"> <div style="border-width: 1px; border-style: solid; border-color: #4A7C7E #B6D4D5 #B6D4D5 #4A7C7E; box-shadow: 0 2px 4px rgba(0, 0, 0, .12); padding-top: 10px">
<el-scrollbar class="table_device" wrap-class="scrollbar-wrapper" style="height: 150px; width: 100%;"> <el-scrollbar class="table_device" wrap-class="scrollbar-wrapper" style="height: 150px; width: 100%;">
<div v-for="item in roleList" :id="item.value" :key="item.value" style="color: #000; width: 100%;background: #5F9EA0" @click="clickEvent(item.value)"> <div v-for="item in roleList" :id="item.value" :key="item.value" style="color: #000; width: 100%;background: #5F9EA0" @click="clickEvent(item.value)">
<span style="position: relative; left: 20px;">{{ item.label }}</span><br> <span style="position: relative; left: 20px;">{{ item.label }}</span><br>

View File

@ -1,7 +1,7 @@
<template> <template>
<el-dialog <el-dialog
v-dialogDrag v-dialogDrag
class="chengdou-03__systerm stand-stop-time" class="chengdou-01__systerm stand-stop-time"
:title="title" :title="title"
:visible.sync="show" :visible.sync="show"
width="320px" width="320px"

View File

@ -1,162 +0,0 @@
<template>
<el-dialog class="chengdou-03__systerm stand-stop-time" :title="title" :visible.sync="show" width="320px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-form size="small" label-width="100px" :model="addModel" :rules="rules" ref="form">
<div style="padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px;">
<span class="base-label">添加位置</span>
<div style="position: relative; top:-10px;">
<el-form-item prop="stationStandCode">
<span slot="label">&emsp;&emsp;&emsp;:</span>
<el-select v-model="addModel.stationStandCode" filterable placeholder="请选择">
<el-option v-for="item in stationStandList" :key="item.code" :label="item.name"
:value="item.code">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="前车车次号:" prop="trainNumberLimber">
<el-input v-model="addModel.trainNumberLimber"></el-input>
</el-form-item>
</div>
</div>
<el-form-item label="添加车次号:" label-width="115px" prop="groupNumber">
<el-input v-model="addModel.groupNumber"></el-input>
</el-form-item>
</el-form>
<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="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'TrainAdd',
components: {
},
data() {
return {
trainNoList: [],
addModel: {
groupNumber: '',
stationStandCode: '',
trainNumberLimber: '',
},
rules: {
groupNumber: [
{ required: true, message: '请输入车次号', trigger: 'blur' }
],
// trainNumberLimber: [
// { required: true, message: '', trigger: 'blur' }
// ],
stationStandCode: [
{ required: true, message: '请选择终端', trigger: 'change' }
],
},
operation: null,
dialogShow: false,
loading: false,
}
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.planTrain.addPlanTrain.domId : '';
},
title() {
return '添加计划车'
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate) {
this.operate = operate || {};
this.operation = operate.operation;
//
if (!this.dialogShow) {
this.loading = false;
}
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.$refs['form'].validate((valid) => {
if (valid) {
let operate = {
send: true,
operation: OperationEvent.Command.planTrain.addPlanTrain.operation,
}
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
} else {
// this.$refs.noticeInfo.doShow(operate);
}
}).catch(error => {
this.loading = false;
this.doClose();
// this.$refs.noticeInfo.doShow(operate);
})
} else {
return false;
}
});
},
cancel() {
let operate = {
operation: OperationEvent.Command.cancel.menu.operation,
}
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => { this.doClose(); });
}
}
}
</script>
<style scoped>
.chengdou-03__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -18px;
padding: 0 5px;
background-color: #F0F0F0;
}
</style>

View File

@ -1,149 +0,0 @@
<template>
<el-dialog class="chengdou-03__systerm stand-stop-time" :title="title" :visible.sync="show" width="320px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-form size="small" label-width="100px" :model="addModel" :rules="rules" ref="form">
<el-form-item prop="stationStandCode">
<span slot="label">&emsp;&emsp;:</span>
<el-select v-model="addModel.stationStandCode" filterable placeholder="请选择">
<el-option v-for="item in stationStandList" :key="item.code" :label="item.name" :value="item.code">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="车 次 号:" prop="groupNumber">
<el-input v-model="addModel.groupNumber"></el-input>
</el-form-item>
</el-form>
<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="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'TrainAdd',
components: {
},
data() {
return {
trainNoList: [],
addModel: {
groupNumber: '',
stationStandCode: '',
},
rules: {
groupNumber: [
{ required: true, message: '请输入车次号', trigger: 'blur' }
],
stationStandCode: [
{ required: true, message: '请选择终端', trigger: 'change' }
],
},
operation: null,
dialogShow: false,
loading: false,
}
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.planTrain.delPlanTrain.domId : '';
},
title() {
return '删除计划车'
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate) {
this.operate = operate || {};
this.operation = operate.operation;
//
if (!this.dialogShow) {
this.loading = false;
}
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.$refs['form'].validate((valid) => {
if (valid) {
let operate = {
send: true,
operation: OperationEvent.Command.planTrain.delPlanTrain.operation,
}
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
} else {
// this.$refs.noticeInfo.doShow(operate);
}
}).catch(error => {
this.loading = false;
this.doClose();
// this.$refs.noticeInfo.doShow(operate);
})
} else {
return false;
}
});
},
cancel() {
let operate = {
operation: OperationEvent.Command.cancel.menu.operation,
}
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => { this.doClose(); });
}
}
}
</script>
<style scoped>
.chengdou-03__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -18px;
padding: 0 5px;
background-color: #F0F0F0;
}
</style>

View File

@ -1,152 +0,0 @@
<template>
<el-dialog class="chengdou-03__systerm stand-stop-time" :title="title" :visible.sync="show" width="320px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-form size="small" label-width="100px" :model="addModel" :rules="rules" ref="form">
<el-form-item label="车 次 号:" label-width="115px" prop="groupNumber">
<el-input v-model="addModel.groupNumber"></el-input>
</el-form-item>
<div style="padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px;">
<span class="base-label">目的</span>
<div style="position: relative; top:-10px;">
<el-form-item prop="stationStandCode">
<span slot="label">&emsp;&emsp;:</span>
<el-select v-model="addModel.stationStandCode" filterable placeholder="请选择">
<el-option v-for="item in stationStandList" :key="item.code" :label="item.name"
:value="item.code">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="车 次 号:" prop="trainNumberLimber">
<el-input v-model="addModel.trainNumberLimber"></el-input>
</el-form-item>
</div>
</div>
</el-form>
<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="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'TrainTranstalet',
components: {
},
data() {
return {
trainNoList: [],
addModel: {
groupNumber: '',
stationStandCode: '',
trainNumberLimber: '',
},
rules: {
groupNumber: [
{ required: true, message: '请输入车次号', trigger: 'blur' }
],
trainNumberLimber: [
{ required: true, message: '请输入前车车次号', trigger: 'blur' }
],
stationStandCode: [
{ required: true, message: '请选择终端', trigger: 'change' }
],
},
operation: null,
dialogShow: false,
loading: false,
}
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.planTrain.translatPlanTrain.domId : '';
},
title() {
return '平移计划车'
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate) {
this.operate = operate || {};
this.operation = operate.operation;
//
if (!this.dialogShow) {
this.loading = false;
}
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.$refs['form'].validate((valid) => {
if (valid) {
let operate = {
send: true,
operation: OperationEvent.Command.planTrain.translatPlanTrain.operation,
}
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
} else {
// this.$refs.noticeInfo.doShow(operate);
}
}).catch(error => {
this.loading = false;
this.doClose();
// this.$refs.noticeInfo.doShow(operate);
})
} else {
return false;
}
});
},
cancel() {
let operate = {
operation: OperationEvent.Command.cancel.menu.operation,
}
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => { this.doClose(); });
}
}
}
</script>

View File

@ -1,166 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm view-display"
title="设备显示设置"
:visible.sync="show"
width="240px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-checkbox-group v-model="deviceLevels">
<div>
<el-checkbox :label="1">车次窗</el-checkbox>
</div>
<div>
<el-checkbox :label="2">区段边界</el-checkbox>
</div>
<div>
<el-checkbox :label="3">联锁自动进路表示灯</el-checkbox>
</div>
<div>
<el-checkbox :label="4">ATS自动触发表示灯</el-checkbox>
</div>
</el-checkbox-group>
<el-row class="button-group">
<el-col :span="8" :offset="2">
<el-button :id="domIdConfirm" class="commit" type="primary" :loading="loading" @click="commit">确定
</el-button>
</el-col>
<el-col :span="8" :offset="3">
<el-button :id="domIdCancel" class="cancal" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
import deviceType from '@/jmap/constant/deviceType';
export default {
name: 'ViewDevice',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
operate: null,
operation: '',
deviceLevels: [2, 3, 4, 5]
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
}
},
mounted() {
this.$nextTick(() => {
this.setDeviceDisplay();
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate) {
//
if (!this.dialogShow) {
this.operate = operate || {};
this.operation = operate.operation;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
cancel() {
let operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
});
},
commit() {
let operate = {
over: true,
type: this.operate.type,
operation: OperationEvent.Command.close.confirm.operation,
val: this.deviceLevels.sort().join('::')
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
this.setDeviceDisplay();
}
}).catch(() => {
this.loading = false;
});
},
setDeviceDisplay() {
let show = false;
let deviceList = [];
//
let borderBorderShow = this.deviceLevels.indexOf(2) !== -1;
let sectionList = this.$store.getters['map/sectionList'];
if (sectionList && sectionList.length > 0) {
sectionList.forEach(elem => {
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { borderBorderShow })); //
});
}
//
let trainWindowShow = this.deviceLevels.indexOf(1) !== -1;
let trainWindowList = this.$store.getters['map/trainWindowList'];
if (trainWindowList && trainWindowList.length > 0) {
trainWindowList.forEach(elem => {
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { trainWindowShow })); //
});
}
// ATS
let linkageAutoRouteShow = this.deviceLevels.indexOf(3) !== -1;//
let atsAutoTriggerShow = this.deviceLevels.indexOf(4) !== -1;// ATS
let signalList = this.$store.getters['map/signalList'];
if (signalList && signalList.length > 0) {
signalList.forEach(elem => {
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { linkageAutoRouteShow, atsAutoTriggerShow }));
});
}
this.$store.dispatch('map/updateMapDevices', deviceList);
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
</style>

View File

@ -1,256 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm view-name"
title="名称显示设置"
:visible.sync="show"
width="320px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-checkbox-group v-model="nameLevels">
<el-row>
<el-col :span="10">
<el-checkbox :label="1">信号机名称</el-checkbox>
</el-col>
<el-col :span="10" :offset="4">
<el-checkbox :label="2">站台轨名称</el-checkbox>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-checkbox :label="3" disabled>按钮名称</el-checkbox>
</el-col>
<el-col :span="10" :offset="4">
<el-checkbox :label="4">折返轨名称</el-checkbox>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-checkbox :label="5">股道名称</el-checkbox>
</el-col>
<el-col :span="10" :offset="4">
<el-checkbox dio :label="6">转换轨名称</el-checkbox>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-checkbox :label="7">道岔名称</el-checkbox>
</el-col>
<el-col :span="10" :offset="4">
<el-checkbox dio :label="8">标识灯名称</el-checkbox>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-checkbox :label="9">道岔区段名称</el-checkbox>
</el-col>
<el-col :span="10" :offset="4">
<el-checkbox dio :label="10">目的地名称</el-checkbox>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-checkbox :label="11">计轴区段名称</el-checkbox>
</el-col>
<el-col :span="10" :offset="4">
<el-checkbox dio :label="12">公里标</el-checkbox>
</el-col>
</el-row>
</el-checkbox-group>
<el-row class="button-group">
<el-col :span="6" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="4" :offset="8">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
export default {
name: 'ViewName',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
operate: null,
nameLevels: [1, 2, 4, 5, 6, 7, 8, 9, 10, 11]
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
}
},
mounted() {
this.$nextTick(() => {
this.setNameDisplay();
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate) {
//
if (!this.dialogShow) {
this.operate = operate || {};
this.operation = operate.operation;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
cancel() {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
});
},
commit() {
const operate = {
over: true,
type: this.operate.type,
operation: OperationEvent.Command.close.confirm.operation,
val: this.nameLevels.sort().join('::')
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
this.setNameDisplay();
}
}).catch(() => {
this.loading = false;
});
},
setNameDisplay() {
const deviceList = [];
//
let nameShow = this.nameLevels.indexOf(1) !== -1;
const signalList = this.$store.getters['map/signalList'];
if (signalList && signalList.length > 0) {
signalList.forEach(elem => {
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow }));
});
}
//
nameShow = this.nameLevels.indexOf(3) !== -1;
//
nameShow = this.nameLevels.indexOf(7) !== -1; //
const switchSectionNameShow = this.nameLevels.indexOf(9) !== -1; //
const switchList = this.$store.getters['map/switchList'];
if (switchList && switchList.length > 0) {
switchList.forEach(elem => {
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow, switchSectionNameShow }));
});
}
//
const indicatorShow = this.nameLevels.indexOf(8) !== -1;
const control = this.$store.getters['map/stationControlList'];
if (control && control.length > 0) {
control.forEach(elem => {
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { indicatorShow })); //
});
}
//
nameShow = false;
let standTrackNameShow = false;
let reentryTrackNameShow = false;
let transferTrackNameShow = false;
const sectionList = this.$store.getters['map/sectionList'];
if (sectionList && sectionList.length > 0) {
sectionList.forEach(elem => {
if (elem.isSwitchSection && elem.parentCode) {
//
nameShow = false;
} else {
if (elem.type === '01') {
nameShow = this.nameLevels.indexOf(11) !== -1;
} else if (elem.type === '02') {
//
nameShow = this.nameLevels.indexOf(5) !== -1;
} else if (elem.type === '03') {
//
nameShow = this.nameLevels.indexOf(9) !== -1;
}
}
//
if (elem.isStandTrack) {
standTrackNameShow = this.nameLevels.indexOf(2) !== -1;
}
//
if (elem.isReentryTrack) {
reentryTrackNameShow = this.nameLevels.indexOf(4) !== -1;
}
//
if (elem.isTransferTrack) {
transferTrackNameShow = this.nameLevels.indexOf(6) !== -1;
}
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow, standTrackNameShow, reentryTrackNameShow, transferTrackNameShow }));
});
}
//
const destCodeShow = this.nameLevels.indexOf(10) !== -1;
const stopPointList = this.$store.getters['map/stopPointList'];
if (stopPointList && stopPointList.length > 0) {
stopPointList.forEach(elem => {
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { destCodeShow }));
});
}
//
const kmPostShow = this.nameLevels.indexOf(12) !== -1;
const stationList = this.$store.getters['map/stationList'];
if (stationList && stationList.length > 0) {
stationList.forEach(elem => {
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { kmPostShow })); //
});
}
this.$store.dispatch('map/updateMapDevices', deviceList);
}
}
};
</script>

View File

@ -1,193 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm view-train-id"
title="列车识别号显示设置"
:visible.sync="show"
width="420px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div style="padding: 10px 20px; border: 1px double lightgray;">
<span class="base-label">计划车显示模式</span>
<el-radio-group v-model="planMode">
<el-row>
<el-col :span="10">
<el-radio :label="1">表号+车次号</el-radio>
</el-col>
<el-col :span="10" :offset="4">
<el-radio :label="2">表号+车组号</el-radio>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-radio :label="3">目的地号+车次号</el-radio>
</el-col>
<el-col :span="10" :offset="4">
<el-radio :label="4">目的地号+车组号</el-radio>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-radio :label="5">目的地号+表号+车次号</el-radio>
</el-col>
<el-col :span="10" :offset="4">
<el-radio :label="6">目的地号+表号+车组号</el-radio>
</el-col>
</el-row>
</el-radio-group>
</div>
<div style="padding: 10px 20px; border: 1px double lightgray; margin: 20px 0px;">
<span class="base-label">头码车显示模式</span>
<el-radio-group v-model="headMode">
<el-row>
<el-col :span="10">
<el-radio :label="3">目的地号+车次号</el-radio>
</el-col>
<el-col :span="6" :offset="8">
<el-radio :label="4">目的地号+车组号</el-radio>
</el-col>
</el-row>
</el-radio-group>
</div>
<div style="padding: 10px 20px; border: 1px double lightgray;">
<span class="base-label">字体大小</span>
<el-row>
<el-col :span="10">
<el-input v-model="fontSize" size="small" min="16" max="99" />
</el-col>
<el-col :span="10" :offset="1">
<span style="height:32px; line-height:32px;">范围16-99</span>
</el-col>
</el-row>
</div>
<el-row class="button-group">
<el-col :span="6" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="4" :offset="8">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
export default {
name: 'ViewTrainId',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
operate: null,
operation: '',
planMode: 5,
headMode: 5,
fontSize: 16
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
}
},
mounted() {
this.$nextTick(() => {
this.setTrainDispaly();
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate) {
this.operate = operate || {};
this.operation = operate.operation;
//
if (!this.dialogShow) {
this.loading = false;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
cancel() {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
});
},
commit() {
const operate = {
over: true,
type: this.operate.type,
operation: OperationEvent.Command.close.confirm.operation,
val: [this.planMode, this.headMode, this.fontSize].join('::')
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.setTrainDispaly();
this.doClose();
}
}).catch(error => {
this.loading = false;
});
},
setTrainDispaly() {
const updatList = [];
const trainList = this.$store.getters['training/viewTrainList']();
if (trainList && trainList.length > 0) {
const nameFormat = this.trainNameFormatBy(this.planMode);
const nameFontSize = this.fontSize;
trainList.forEach(elem => {
updatList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameFormat, nameFontSize }));
});
this.$store.dispatch('map/updateMapDevices', updatList);
}
},
trainNameFormatBy(mode) {
switch (mode.toString()) {
case '1': return 'serviceNumber:tripNumber'; // +
case '2': return 'serviceNumber:groupNumber'; // +
case '3': return 'targetCode:tripNumber'; // +
case '4': return 'targetCode:groupNumber'; // +
case '5': return 'targetCode:serviceNumber:tripNumber'; // ++
case '6': return 'targetCode:serviceNumber:groupNumber'; // ++
}
return ''; //
}
}
};
</script>

View File

@ -1,5 +1,5 @@
<template> <template>
<div class="chengdou-03__systerm request_box"> <div class="chengdou-01__systerm request_box">
<div class="title-box"> <div class="title-box">
<div class="title-name">操作请求堆栈</div> <div class="title-name">操作请求堆栈</div>
<div class="icon" :class="{'is-active': unfold}" @click="unflodDiv"> <div class="icon" :class="{'is-active': unfold}" @click="unflodDiv">

View File

@ -1,9 +1,6 @@
<template> <template>
<div> <div>
<pop-menu ref="popMenu" :menu="menu" /> <pop-menu ref="popMenu" :menu="menu" />
<section-control ref="sectionControl" />
<train-create ref="trainCreate" />
<section-detail ref="sectionDetail" />
<notice-info ref="noticeInfo" /> <notice-info ref="noticeInfo" />
<speed-limit-control ref="speedLimitControl" /> <speed-limit-control ref="speedLimitControl" />
</div> </div>
@ -11,9 +8,6 @@
<script> <script>
import PopMenu from '@/components/PopMenu'; import PopMenu from '@/components/PopMenu';
import SectionControl from './dialog/sectionControl';
import SectionDetail from './dialog/sectionDetail';
import TrainCreate from './dialog/trainCreate';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo'; import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import SpeedLimitControl from './dialog/speedLimitControl'; import SpeedLimitControl from './dialog/speedLimitControl';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
@ -26,9 +20,6 @@ export default {
name: 'SectionMenu', name: 'SectionMenu',
components: { components: {
PopMenu, PopMenu,
SectionControl,
SectionDetail,
TrainCreate,
NoticeInfo, NoticeInfo,
SpeedLimitControl SpeedLimitControl
}, },

View File

@ -1,8 +1,6 @@
<template> <template>
<div> <div>
<pop-menu ref="popMenu" :menu="menu" /> <pop-menu ref="popMenu" :menu="menu" />
<route-control ref="routeControl" />
<route-guide ref="routeGuide" />
<notice-info ref="noticeInfo" /> <notice-info ref="noticeInfo" />
<create-device-label ref="createDeviceLabel" /> <create-device-label ref="createDeviceLabel" />
</div> </div>
@ -10,8 +8,6 @@
<script> <script>
import PopMenu from '@/components/PopMenu'; import PopMenu from '@/components/PopMenu';
import RouteControl from './dialog/routeControl';
import RouteGuide from './dialog/routeGuide';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo'; import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import CreateDeviceLabel from './dialog/createDeviceLabel'; import CreateDeviceLabel from './dialog/createDeviceLabel';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
@ -24,8 +20,6 @@ export default {
name: 'SignalMenu', name: 'SignalMenu',
components: { components: {
PopMenu, PopMenu,
RouteControl,
RouteGuide,
NoticeInfo, NoticeInfo,
CreateDeviceLabel CreateDeviceLabel
}, },
@ -426,6 +420,7 @@ export default {
}); });
}, },
createDeviceLabel() { createDeviceLabel() {
this.doClose();
this.$refs.createDeviceLabel.doShow(); this.$refs.createDeviceLabel.doShow();
} }
} }

View File

@ -1,69 +0,0 @@
<template>
<pop-menu ref="popMenu" :menu="menu" />
</template>
<script>
import PopMenu from '@/components/PopMenu';
import { mapGetters } from 'vuex';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
export default {
name: 'StationControlMenu',
components: {
PopMenu
},
props: {
selected: {
type: Object,
default() {
return null;
}
}
},
data() {
return {
menu: [],
menuNormal: [
],
menuForce: [
]
};
},
computed: {
...mapGetters('training', [
'mode',
'operatemode'
]),
...mapGetters('menuOperation', [
'buttonOperation'
])
},
watch: {
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.StationControl) && !this.buttonOperation) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
}
}
},
methods: {
clickEvent() {
const self = this;
window.onclick = function (e) {
self.doClose();
};
},
doShow(point) {
if (this.$refs && this.$refs.popMenu) {
this.$refs.popMenu.close();
}
},
doClose() {
if (this.$refs && this.$refs.popMenu) {
this.$refs.popMenu.close();
}
}
}
};
</script>

View File

@ -1,7 +1,7 @@
<template> <template>
<el-dialog <el-dialog
v-dialogDrag v-dialogDrag
class="chengdou-03__systerm stand-stop-time" class="chengdou-01__systerm stand-stop-time"
:title="title" :title="title"
:visible.sync="show" :visible.sync="show"
width="900px" width="900px"
@ -158,7 +158,7 @@ export default {
}; };
</script> </script>
<style scoped> <style scoped>
.chengdou-03__systerm .el-dialog .base-label { .chengdou-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x); background: rgba(0, 0, 0, x);
position: relative; position: relative;
left: -5px; left: -5px;

View File

@ -1,8 +1,6 @@
<template> <template>
<div> <div>
<pop-menu ref="popMenu" :menu="menu" /> <pop-menu ref="popMenu" :menu="menu" />
<stand-control ref="standControl" />
<stand-detail ref="standDetail" />
<notice-info ref="noticeInfo" /> <notice-info ref="noticeInfo" />
<platform-dwell ref="platformDwell" /> <platform-dwell ref="platformDwell" />
</div> </div>
@ -10,14 +8,11 @@
<script> <script>
import PopMenu from '@/components/PopMenu'; import PopMenu from '@/components/PopMenu';
import StandControl from './dialog/standControl';
import StandDetail from './dialog/standDetail';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo'; import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import PlatformDwell from './dialog/platformDwell'; import PlatformDwell from './dialog/platformDwell';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { OperateMode } from '@/scripts/ConstDic'; import { OperateMode } from '@/scripts/ConstDic';
// import Handler from '@/scripts/cmdPlugin/Handler';
import CMD from '@/scripts/cmdPlugin/CommandEnum'; import CMD from '@/scripts/cmdPlugin/CommandEnum';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
@ -25,8 +20,6 @@ export default {
name: 'StationStandMenu', name: 'StationStandMenu',
components: { components: {
PopMenu, PopMenu,
StandControl,
StandDetail,
NoticeInfo, NoticeInfo,
PlatformDwell PlatformDwell
}, },
@ -150,7 +143,7 @@ export default {
operation: OperationEvent.StationStand.stoppage.menu.operation, operation: OperationEvent.StationStand.stoppage.menu.operation,
cmdType: CMD.Stand.CMD_STAND_ADD_FAULT, cmdType: CMD.Stand.CMD_STAND_ADD_FAULT,
param: { param: {
StationStand_Code: `${this.selected.code}` standCode: `${this.selected.code}`
} }
}; };
this.$store.dispatch('training/nextNew', step).then(({ valid }) => { this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
@ -171,7 +164,7 @@ export default {
operation: OperationEvent.StationStand.cancelStoppage.menu.operation, operation: OperationEvent.StationStand.cancelStoppage.menu.operation,
cmdType: CMD.Stand.CMD_STAND_REMOVE_FAULT, cmdType: CMD.Stand.CMD_STAND_REMOVE_FAULT,
param: { param: {
StationStand_Code: `${this.selected.code}` standCode: `${this.selected.code}`
} }
}; };
@ -192,13 +185,13 @@ export default {
code: `${this.selected.code}`, code: `${this.selected.code}`,
operation: OperationEvent.StationStand.setJumpStop.menu.operation, operation: OperationEvent.StationStand.setJumpStop.menu.operation,
param: { param: {
StationStand_Code: `${this.selected.code}` standCode: `${this.selected.code}`
} }
}; };
this.$store.dispatch('training/nextNew', step).then(({ valid }) => { this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$store.dispatch('menuOperation/pushRequestList', { device: this.selected, operation: { code: OperationEvent.StationStand.setJumpStop.menu.operation, name: '设置跳停'}}); this.$store.dispatch('menuOperation/pushRequestList', { device: this.selected, operation: OperationEvent.StationStand.setJumpStop.menu.operation});
// this.$refs.standControl.doShow(step, this.selected); // this.$refs.standControl.doShow(step, this.selected);
} }
}); });
@ -210,7 +203,7 @@ export default {
code: `${this.selected.code}`, code: `${this.selected.code}`,
operation: OperationEvent.StationStand.cancelJumpStop.menu.operation, operation: OperationEvent.StationStand.cancelJumpStop.menu.operation,
param: { param: {
StationStand_Code: `${this.selected.code}` standCode: `${this.selected.code}`
} }
}; };
this.$store.dispatch('training/nextNew', step).then(({ valid }) => { this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
@ -228,7 +221,7 @@ export default {
code: `${this.selected.code}`, code: `${this.selected.code}`,
operation: OperationEvent.StationStand.setStopTime.menu.operation, operation: OperationEvent.StationStand.setStopTime.menu.operation,
param: { param: {
StationStand_Code: `${this.selected.code}` standCode: `${this.selected.code}`
} }
}; };
this.$store.dispatch('training/nextNew', step).then(({ valid }) => { this.$store.dispatch('training/nextNew', step).then(({ valid }) => {

View File

@ -1,8 +1,6 @@
<template> <template>
<div> <div>
<pop-menu ref="popMenu" :menu="menu" /> <pop-menu ref="popMenu" :menu="menu" />
<section-control ref="sectionControl" />
<switch-control ref="switchControl" />
<notice-info ref="noticeInfo" /> <notice-info ref="noticeInfo" />
<create-device-label ref="createDeviceLabel" /> <create-device-label ref="createDeviceLabel" />
</div> </div>
@ -10,8 +8,6 @@
<script> <script>
import PopMenu from '@/components/PopMenu'; import PopMenu from '@/components/PopMenu';
import SectionControl from './dialog/sectionControl';
import SwitchControl from './dialog/switchControl';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo'; import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import CreateDeviceLabel from './dialog/createDeviceLabel'; import CreateDeviceLabel from './dialog/createDeviceLabel';
import CMD from '@/scripts/cmdPlugin/CommandEnum'; import CMD from '@/scripts/cmdPlugin/CommandEnum';
@ -25,8 +21,6 @@ export default {
name: 'SwitchMenu', name: 'SwitchMenu',
components: { components: {
PopMenu, PopMenu,
SectionControl,
SwitchControl,
NoticeInfo, NoticeInfo,
CreateDeviceLabel CreateDeviceLabel
}, },

View File

@ -1,214 +0,0 @@
<template>
<div id="menuTool">
<div class="nav">
<div v-for="(item,index) in tools" :key="index" class="tool">
<img :src="item.src" :alt="item.title">
</div>
<img class="logo" :src="logoImg">
<system-time
v-if="isShowSystemTime"
class="time"
:time="time"
:zoom="2"
:width="180"
:height="48"
:fine="2"
:top="6"
/>
</div>
</div>
</template>
<script>
// import { mapGetters } from 'vuex';
// import { TrainingMode, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
// import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'
import { prefixIntrger } from '@/utils/date';
import SystemTime from '@/views/components/systemTime/index';
import logo_ from '@/assets/logo_.png';
export default {
name: 'MenuTool',
components: {
SystemTime
},
props: {
selected: {
type: Object,
default() {
return null;
}
}
},
data() {
return {
logoImg: logo_,
time: '00:0000',
tools: [
{
title: '服务器1',
operate: '',
src: logo_,
click: this.undeveloped
},
{
title: '服务器2',
operate: '',
src: '',
click: this.undeveloped
},
{
title: '前置机1',
operate: '',
src: '',
click: this.undeveloped
},
{
title: '前置机2',
operate: '',
src: '',
click: this.undeveloped
},
{
title: '主调',
operate: '',
src: '',
click: this.undeveloped
},
{
title: '调度台1',
operate: '',
src: '',
click: this.undeveloped
},
{
title: '调度台2',
operate: '',
src: '',
click: this.undeveloped
},
{
title: '调度台3',
operate: '',
src: '',
click: this.undeveloped
},
{
title: '大屏',
operate: '',
src: '',
click: this.undeveloped
},
{
title: '维护工作站',
operate: '',
src: '',
click: this.undeveloped
},
{
title: '运行图显示人工站',
operate: '',
src: '',
click: this.undeveloped
},
{
title: '跳停',
operate: '',
src: '',
click: this.undeveloped
},
{
title: '扣车',
operate: '',
src: '',
click: this.undeveloped
},
{
title: '列车报警',
operate: '',
src: logo_,
click: this.undeveloped
}
]
};
},
computed: {
isShowSystemTime() {
return this.$route.params.mode == 'demon' || this.$route.params.mode === 'dp' || !this.$route.params.mode;
}
},
watch: {
'$store.state.training.initTime': function (initTime) {
const date = new Date(initTime);
this.time = `${prefixIntrger(date.getHours(), 2)}:${prefixIntrger(date.getMinutes(), 2)}${prefixIntrger(date.getSeconds(), 2)}`;
}
},
mounted() {
this.initTools();
},
methods: {
initTools() {
this.tools = [];
}
}
};
</script>
<style scoped rel="stylesheet/scss" lang="scss">
@import "src/styles/mixin.scss";
$top: 30px;
$width: 50px;
$height: 50px;
#menuTool {
z-index: 5;
position: absolute;
top: $top;
width: 100%;
}
.nav {
display: block;
height: $height;
line-height: $height;
color: #0000;
background: #ECE9D8;
border: 1px solid #B6BCCC !important;
border-bottom: 2px solid #B6BCCC !important;
list-style: none;
}
.tool {
background: #808080;
display: flex;
justify-content: center;
cursor: pointer;
position: relative;
float: left;
height: $height - 2;
width: $width + 15;
margin: 1px;
img {
display: block;
text-align: center;
padding-top: 4px;
height: $height - 10;
width: $width - 10;
}
}
.time {
position: relative;
float: right;
text-align: center;
}
.logo {
position: relative;
float: right;
text-align: center;
margin: 1px 10px;
height: $height - 4;
width: $width - 4;
}
</style>

View File

@ -2,12 +2,6 @@
<div> <div>
<pop-menu ref="popMenu" :menu="menu" /> <pop-menu ref="popMenu" :menu="menu" />
<notice-info ref="noticeInfo" /> <notice-info ref="noticeInfo" />
<train-control ref="trainControl" />
<train-edit-number ref="trainEditNumber" />
<train-create-number ref="trainCreateNumber" />
<train-move-number ref="trainMoveNumber" />
<train-delete-number ref="trainDeleteNumber" />
<train-detail-info ref="trainDetailInfo" />
</div> </div>
</template> </template>
@ -18,25 +12,13 @@ import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic'; import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import { MenuDisabledState, menuConvert, trainMenuFiltration } from './utils/menuItemStatus'; import { MenuDisabledState, menuConvert, trainMenuFiltration } from './utils/menuItemStatus';
import TrainControl from './dialog/trainControl';
import TrainEditNumber from './dialog/trainEditNumber';
import TrainMoveNumber from './dialog/trainMoveNumber';
import TrainCreateNumber from './dialog/trainCreateNumber';
import TrainDeleteNumber from './dialog/trainDeleteNumber';
import TrainDetailInfo from './dialog/trainDetailInfo';
import CancelMouseState from '@/mixin/CancelMouseState'; import CancelMouseState from '@/mixin/CancelMouseState';
export default { export default {
name: 'MenuTrain', name: 'MenuTrain',
components: { components: {
PopMenu, PopMenu,
NoticeInfo, NoticeInfo
TrainControl,
TrainEditNumber,
TrainMoveNumber,
TrainCreateNumber,
TrainDeleteNumber,
TrainDetailInfo
}, },
mixins: [ mixins: [
CancelMouseState CancelMouseState
@ -136,66 +118,6 @@ export default {
handler: '', handler: '',
cmdType: '' cmdType: ''
} }
// {
// label: '',
// handler: this.createTrainNo,
// disabledCallback: MenuDisabledState.Train.createTrainNo,
// auth: { station: true, center: true }
// },
// {
// label: '',
// handler: this.moveTrainNo,
// disabledCallback: MenuDisabledState.Train.moveTrainNo,
// auth: { station: true, center: true }
// },
// {
// label: '',
// handler: this.deleteTrainNo,
// disabledCallback: MenuDisabledState.Train.deleteTrainNo,
// auth: { station: true, center: true }
// },
// {
// label: '',
// handler: this.editTrainNo,
// disabledCallback: MenuDisabledState.Train.editTrainNo,
// auth: { station: true, center: true }
// },
// {
// label: '',
// handler: this.setPlanTrainId,
// disabledCallback: MenuDisabledState.Train.setPlanTrainId,
// auth: { station: true, center: true }
// },
// {
// label: '',
// handler: this.destinationTrainId,
// disabledCallback: MenuDisabledState.Train.destinationTrainId,
// auth: { station: true, center: true }
// },
// {
// label: '',
// handler: this.artificialTrainId,
// disabledCallback: MenuDisabledState.Train.artificialTrainId,
// auth: { station: true, center: true }
// },
// {
// label: '',
// handler: this.undeveloped,
// disabledCallback: MenuDisabledState.Train.moveTrainId,
// auth: { station: true, center: true}
// },
// {
// label: '',
// handler: this.detailTrainInfo,
// disabledCallback: MenuDisabledState.Train.detailTrainInfo,
// auth: { station: true, center: true}
// },
// {
// label: '',
// handler: this.undeveloped,
// disabledCallback: MenuDisabledState.Train.moveTrainId,
// auth: { station: true, center: true}
// }
] ]
}, },

View File

@ -520,7 +520,7 @@ export default {
operation: OperationEvent.StationStand.setRunLevel.chooseTrain.operation, operation: OperationEvent.StationStand.setRunLevel.chooseTrain.operation,
val: `${upDown}`, val: `${upDown}`,
param: { param: {
Stand_RunLevel: `${upDown}` standRunLevel: `${upDown}`
} }
}; };
@ -574,7 +574,7 @@ export default {
cmdType: CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN, cmdType: CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN,
val: `${this.radio}`, val: `${this.radio}`,
param: { param: {
Stand_AllLine: `${this.radio}` standAllLine: `${this.radio}`
} }
}; };
if (this.radio == '02') { if (this.radio == '02') {
@ -610,8 +610,8 @@ export default {
cmdType: CMD.Stand.CMD_STAND_SET_JUMP_STOP, cmdType: CMD.Stand.CMD_STAND_SET_JUMP_STOP,
val: val, val: val,
param: { param: {
Stand_JumpStop_Range: `${this.radio}`, standJumpStopRange: `${this.radio}`,
Train_GroupNo: `${this.tripNumber}` trainGroupNo: `${this.tripNumber}`
} }
}; };
@ -635,8 +635,8 @@ export default {
cmdType: CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP, cmdType: CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP,
val: this.radio + '::' + this.tripNumber, val: this.radio + '::' + this.tripNumber,
param: { param: {
Stand_JumpStop_Range: `${this.radio}`, standJumpStopRange: `${this.radio}`,
Train_GroupNo: `${this.tripNumber}` trainGroupNo: `${this.tripNumber}`
} }
}; };
@ -661,9 +661,9 @@ export default {
cmdType: CMD.Stand.CMD_STAND_SET_PARK_TIME, cmdType: CMD.Stand.CMD_STAND_SET_PARK_TIME,
val: [`${this.radio}`, this.trainStopTime, forver].join('::'), val: [`${this.radio}`, this.trainStopTime, forver].join('::'),
param: { param: {
Stand_StopControl: `${this.radio}`, standStopControl: `${this.radio}`,
Stand_StopTime: this.trainStopTime, standStopTime: this.trainStopTime,
Stand_AlwaysValid: forver standAlwaysValid: forver
} }
}; };
@ -693,9 +693,9 @@ export default {
cmdType: CMD.Stand.CMD_STAND_SET_RUN_TIME, cmdType: CMD.Stand.CMD_STAND_SET_RUN_TIME,
val: val, val: val,
param: { param: {
Stand_StopControl: `${this.radio}`, standStopControl: `${this.radio}`,
Stand_RunLevel: this.radio === '02' ? `${this.trainRunlevel}` : '01', standRunLevel: this.radio === '02' ? `${this.trainRunlevel}` : '01',
Stand_AlwaysValid: `${forver}` standAlwaysValid: `${forver}`
} }
}; };

View File

@ -158,7 +158,7 @@ export default {
operation: OperationEvent.StationStand.stoppage.menu.operation, operation: OperationEvent.StationStand.stoppage.menu.operation,
cmdType: CMD.Stand.CMD_STAND_ADD_FAULT, cmdType: CMD.Stand.CMD_STAND_ADD_FAULT,
param: { param: {
StationStand_Code: `${this.selected.code}` standCode: `${this.selected.code}`
} }
}; };
this.$store.dispatch('training/nextNew', step).then(({ valid }) => { this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
@ -179,7 +179,7 @@ export default {
operation: OperationEvent.StationStand.cancelStoppage.menu.operation, operation: OperationEvent.StationStand.cancelStoppage.menu.operation,
cmdType: CMD.Stand.CMD_STAND_REMOVE_FAULT, cmdType: CMD.Stand.CMD_STAND_REMOVE_FAULT,
param: { param: {
StationStand_Code: `${this.selected.code}` standCode: `${this.selected.code}`
} }
}; };
@ -200,7 +200,7 @@ export default {
code: `${this.selected.code}`, code: `${this.selected.code}`,
operation: OperationEvent.StationStand.setDetainTrain.menu.operation, operation: OperationEvent.StationStand.setDetainTrain.menu.operation,
param: { param: {
StationStand_Code: `${this.selected.code}` standCode: `${this.selected.code}`
} }
}; };
@ -218,7 +218,7 @@ export default {
code: `${this.selected.code}`, code: `${this.selected.code}`,
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation, operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation,
param: { param: {
StationStand_Code: `${this.selected.code}` standCode: `${this.selected.code}`
} }
}; };
this.$store.dispatch('training/nextNew', step).then(({ valid }) => { this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
@ -235,7 +235,7 @@ export default {
code: `${this.selected.code}`, code: `${this.selected.code}`,
operation: OperationEvent.StationStand.setJumpStop.menu.operation, operation: OperationEvent.StationStand.setJumpStop.menu.operation,
param: { param: {
StationStand_Code: `${this.selected.code}` standCode: `${this.selected.code}`
} }
}; };
this.$store.dispatch('training/nextNew', step).then(({ valid }) => { this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
@ -252,7 +252,7 @@ export default {
code: `${this.selected.code}`, code: `${this.selected.code}`,
operation: OperationEvent.StationStand.cancelJumpStop.menu.operation, operation: OperationEvent.StationStand.cancelJumpStop.menu.operation,
param: { param: {
StationStand_Code: `${this.selected.code}` standCode: `${this.selected.code}`
} }
}; };
this.$store.dispatch('training/nextNew', step).then(({ valid }) => { this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
@ -269,13 +269,13 @@ export default {
code: `${this.selected.code}`, code: `${this.selected.code}`,
operation: OperationEvent.StationStand.setStopTime.menu.operation, operation: OperationEvent.StationStand.setStopTime.menu.operation,
param: { param: {
StationStand_Code: `${this.selected.code}` standCode: `${this.selected.code}`
} }
}; };
this.$store.dispatch('training/nextNew', step).then(({ valid, response }) => { this.$store.dispatch('training/nextNew', step).then(({ valid, response }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
Handler.execute(CMD.Stand.CMD_STAND_VIEW_STATUS, {StationStand_Code: `${this.selected.code}`}).then(resp => { Handler.execute(CMD.Stand.CMD_STAND_VIEW_STATUS, {standCode: `${this.selected.code}`}).then(resp => {
const tempData = resp.data; const tempData = resp.data;
this.$refs.standControl.doShow(step, this.selected, tempData); this.$refs.standControl.doShow(step, this.selected, tempData);
}); });
@ -291,13 +291,13 @@ export default {
code: `${this.selected.code}`, code: `${this.selected.code}`,
operation: OperationEvent.StationStand.setRunLevel.menu.operation, operation: OperationEvent.StationStand.setRunLevel.menu.operation,
param: { param: {
StationStand_Code: `${this.selected.code}` standCode: `${this.selected.code}`
} }
}; };
this.$store.dispatch('training/nextNew', step).then(({ valid, response }) => { this.$store.dispatch('training/nextNew', step).then(({ valid, response }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
Handler.execute(CMD.Stand.CMD_STAND_VIEW_STATUS, {StationStand_Code: `${this.selected.code}`}).then(resp => { Handler.execute(CMD.Stand.CMD_STAND_VIEW_STATUS, {standCode: `${this.selected.code}`}).then(resp => {
const tempData = resp.data; const tempData = resp.data;
this.$refs.standControl.doShow(step, this.selected, tempData); this.$refs.standControl.doShow(step, this.selected, tempData);
}); });
@ -313,13 +313,13 @@ export default {
code: `${this.selected.code}`, code: `${this.selected.code}`,
operation: OperationEvent.StationStand.detail.menu.operation, operation: OperationEvent.StationStand.detail.menu.operation,
param: { param: {
StationStand_Code: `${this.selected.code}` standCode: `${this.selected.code}`
} }
}; };
this.$store.dispatch('training/nextNew', step).then(({ valid, response }) => { this.$store.dispatch('training/nextNew', step).then(({ valid, response }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
Handler.execute(CMD.Stand.CMD_STAND_VIEW_STATUS, {StationStand_Code: `${this.selected.code}`}).then(resp => { Handler.execute(CMD.Stand.CMD_STAND_VIEW_STATUS, {standCode: `${this.selected.code}`}).then(resp => {
const tempData = resp.data; const tempData = resp.data;
this.$refs.standDetail.doShow(step, this.selected, tempData); this.$refs.standDetail.doShow(step, this.selected, tempData);
}); });