This commit is contained in:
zyy 2020-04-10 10:19:15 +08:00
commit b4a2e19d77
6 changed files with 311 additions and 297 deletions

View File

@ -18,7 +18,7 @@
<!-- <el-button class="expand" @click="expandPath">展开进路预览</el-button> -->
</el-col>
</el-row>
<el-table ref="table" :data="tempData" border :cell-style="tableStyle" style="width: 100%; margin-top:10px" size="mini" height="120" highlight-current-row :show-header="false" @row-click="clickEvent">
<el-table ref="table" :data="tempData" border :cell-style="tableStyle" style="width: 100%; height: 120px; margin-top:10px" size="mini" highlight-current-row :show-header="false" @row-click="clickEvent">
<el-table-column :id="domIdChoose" prop="name" style="margin-left:30px" />
</el-table>
<el-row justify="center" class="button-group">

View File

@ -293,10 +293,10 @@ export default {
if (valid) {
this.doClose();
}
}).catch((error) => {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow({}, error.message);
// this.$refs.noticeInfo.doShow({}, error.message);
});
} else {
this.doClose();

View File

@ -13,9 +13,9 @@
<menu-train ref="menuTrain" :selected="selected" />
<menu-station ref="menuStation" :selected="selected" />
<menu-limit ref="menuLimit" :selected="selected" />
<passive-alarm ref="passiveAlarm" />
<!--<passive-alarm ref="passiveAlarm" />-->
<passive-contorl ref="passiveControl" />
<passive-Timeout ref="passiveTimeout" />
<!--<passive-Timeout ref="passiveTimeout" />-->
</template>
</div>
</template>
@ -34,9 +34,9 @@ import MenuTrain from './menuTrain';
import MenuStation from './menuStation';
import MenuBar from './menuBar';
import MenuLimit from './menuLimit';
import PassiveAlarm from './passiveDialog/alarm';
// import PassiveAlarm from './passiveDialog/alarm';
import PassiveContorl from './passiveDialog/control';
import PassiveTimeout from './passiveDialog/timeout';
// import PassiveTimeout from './passiveDialog/timeout';
export default {
name: 'Menus',
@ -53,9 +53,9 @@ export default {
MenuStation,
MenuTrain,
MenuLimit,
PassiveAlarm,
PassiveContorl,
PassiveTimeout
// PassiveAlarm,
PassiveContorl
// PassiveTimeout
},
props: {
selected: {
@ -113,7 +113,7 @@ export default {
.ningbo-01__systerm .el-dialog {
background: rgba(100, 100, 100, 0.3);
border: 2px solid rgb(144, 144, 144, 0.8);
border: 2px solid rgba(144, 144, 144, 0.8);
border-radius: 6px;
color: #000;
font-size: 14px;

View File

@ -1,207 +1,213 @@
<template>
<el-dialog class="ningbo-01__systerm alarm-detail" :title="level+'级告警详细信息'" :visible.sync="show" width="760px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-form label-width="80px" size="mini">
<el-row>
<el-col :span="8">
<el-form-item label="线路名称">
<el-input v-model="model.lineName" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="单位名称">
<el-input v-model="model.unitName" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="模块名称">
<el-input v-model="model.moduleName" disabled></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="9">
<el-form-item label="报警时间">
<el-date-picker v-model="model.alarmDate" type="datetime" placeholder="选择日期时间" disabled>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="7">
<el-form-item>
<span slot="label">&emsp;</span>
<el-input v-model="model.level" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="确认状态">
<el-input v-model="model.confirm" disabled></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="9" class="alarm-type">
<el-form-item>
<span slot="label">&emsp;&emsp;</span>
<el-input v-model="model.type" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="15" class="alarm-child-type">
<el-form-item label="子类型">
<el-input v-model="model.childType" disabled></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="时间摘要">
<el-input v-model="model.timeSummary" disabled></el-input>
</el-form-item>
<el-form-item label="推荐操作">
<el-input v-model="model.recommendedOperation" disabled></el-input>
</el-form-item>
<div class="alarm-detail-description">
<span> 报警详细描述</span><br>
<el-input type="textarea" :rows="5" placeholder="请输入内容" v-model="model.alarmDetail" disabled>
</el-input>
</div>
</el-form>
<el-row class="button-group">
<el-col :span="3" :offset="9">
<el-button :id="domIdCancel" type="primary" :loading="loading" @click="commit"> </el-button>
</el-col>
<el-col :span="10">
<span style="line-height:26px">未确认{{level}}级报警数目1</span>
</el-col>
</el-row>
</el-dialog>
<el-dialog
v-dialogDrag
class="ningbo-01__systerm alarm-detail"
:title="level+'级告警详细信息'"
:visible.sync="show"
width="760px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-form label-width="80px" size="mini">
<el-row>
<el-col :span="8">
<el-form-item label="线路名称">
<el-input v-model="model.lineName" disabled />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="单位名称">
<el-input v-model="model.unitName" disabled />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="模块名称">
<el-input v-model="model.moduleName" disabled />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="9">
<el-form-item label="报警时间">
<el-date-picker v-model="model.alarmDate" type="datetime" placeholder="选择日期时间" disabled />
</el-form-item>
</el-col>
<el-col :span="7">
<el-form-item>
<span slot="label">&emsp;</span>
<el-input v-model="model.level" disabled />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="确认状态">
<el-input v-model="model.confirm" disabled />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="9" class="alarm-type">
<el-form-item>
<span slot="label">&emsp;&emsp;</span>
<el-input v-model="model.type" disabled />
</el-form-item>
</el-col>
<el-col :span="15" class="alarm-child-type">
<el-form-item label="子类型">
<el-input v-model="model.childType" disabled />
</el-form-item>
</el-col>
</el-row>
<el-form-item label="时间摘要">
<el-input v-model="model.timeSummary" disabled />
</el-form-item>
<el-form-item label="推荐操作">
<el-input v-model="model.recommendedOperation" disabled />
</el-form-item>
<div class="alarm-detail-description">
<span> 报警详细描述</span><br>
<el-input v-model="model.alarmDetail" type="textarea" :rows="5" placeholder="请输入内容" disabled />
</div>
</el-form>
<el-row class="button-group">
<el-col :span="3" :offset="9">
<el-button :id="domIdCancel" type="primary" :loading="loading" @click="commit"> </el-button>
</el-col>
<el-col :span="10">
<span style="line-height:26px">未确认{{ level }}级报警数目1</span>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/ConstDic';
export default {
name: 'AlarmDetail',
data() {
return {
dialogShow: false,
loading: false,
level: 0,
operate: null,
controlProps: {
'01': '中控',
'02': '站控'
},
model: {
lineName: '',
unitName: '',
moduleName: '',
level: '',
confirm: '',
alarmDate: '',
type: '',
childType: '',
timeSummary: '',
recommendedOperation: '',
alarmDetail: ''
}
export default {
name: 'AlarmDetail',
data() {
return {
dialogShow: false,
loading: false,
level: 0,
operate: null,
controlProps: {
'01': '中控',
'02': '站控'
},
model: {
lineName: '',
unitName: '',
moduleName: '',
level: '',
confirm: '',
alarmDate: '',
type: '',
childType: '',
timeSummary: '',
recommendedOperation: '',
alarmDetail: ''
}
};
},
computed: {
...mapGetters('map', [
'name'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
computed: {
...mapGetters('map', [
'name',
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.close.alarm.domId : '';
},
},
watch: {
'$store.state.socket.msgHead': function (elem) {
if (elem && elem.hasOwnProperty('success')) {
if (elem.success) {
let operate = this.$store.state.training.operate;
let control = this.$store.getters['map/getDeviceByCode'](elem.stationControlCode);
let station = this.$store.getters['map/getDeviceByCode'](control.stationCode);
let newOperate = {
type: operate.type,
name: station.name,
}
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.close.alarm.domId : '';
}
},
watch: {
'$store.state.socket.msgHead': function (elem) {
if (elem && elem.hasOwnProperty('success')) {
if (elem.success) {
const operate = this.$store.state.training.operate;
const control = this.$store.getters['map/getDeviceByCode'](elem.stationControlCode);
const station = this.$store.getters['map/getDeviceByCode'](control.stationCode);
const newOperate = {
type: operate.type,
name: station.name
};
this.doShow(newOperate);
}
this.doShow(newOperate);
}
},
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate) {
this.operate = operate || {};
this.model = {
lineName: this.name,
unitName: this.operate.name,
moduleName: 'CMM控制模式转换模式',
level: '0级告警',
confirm: '确认状态',
alarmDate: new Date(),
type: '系统事件',
childType: '依据信号设备操作命令设置控制模式',
timeSummary: '控制模式摘要',
recommendedOperation: '',
alarmDetail: `控制模式转换:${this.operate.name}由中控转为站控模式!`
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
if (this.dialogShow) {
this.$store.dispatch('socket/shiftMsgQueue');
}
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
cancel() {
let operate = {
type: this.operate.type,
operation: OperationEvent.Command.close.alarm.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {
this.doClose();
}
})
},
commit() {
let operate = {
type: this.operate.type,
operation: OperationEvent.Command.close.alarm.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {
this.doClose();
}
})
},
isClose() {
return this.dialogShow;
}
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate) {
this.operate = operate || {};
this.model = {
lineName: this.name,
unitName: this.operate.name,
moduleName: 'CMM控制模式转换模式',
level: '0级告警',
confirm: '确认状态',
alarmDate: new Date(),
type: '系统事件',
childType: '依据信号设备操作命令设置控制模式',
timeSummary: '控制模式摘要',
recommendedOperation: '',
alarmDetail: `控制模式转换:${this.operate.name}由中控转为站控模式!`
};
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
if (this.dialogShow) {
this.$store.dispatch('socket/shiftMsgQueue');
}
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
cancel() {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.close.alarm.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {
this.doClose();
}
});
},
commit() {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.close.alarm.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {
this.doClose();
}
});
},
isClose() {
return this.dialogShow;
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.alarm-type .el-input {
width: 220px;
}
@ -210,4 +216,4 @@
padding-left: 12px;
text-align: left;
}
</style>
</style>

View File

@ -1,106 +1,114 @@
<template>
<el-dialog class="ningbo-01__systerm cmd-notice" title="操作命令提示" :visible.sync="show" width="400px" :before-close="doClose"
:zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<span>{{name}}{{msg}}!</span>
<el-row class="button-group">
<el-button :id="domIdCancel" type="primary" :loading="loading" @click="commit">确认</el-button>
</el-row>
</el-dialog>
<el-dialog
v-dialogDrag
class="ningbo-01__systerm cmd-notice"
title="操作命令提示"
:visible.sync="show"
width="400px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<span>{{ name }}{{ msg }}!</span>
<el-row class="button-group">
<el-button :id="domIdCancel" type="primary" :loading="loading" @click="commit">确认</el-button>
</el-row>
</el-dialog>
</template>
<script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
export default {
name: 'CmdNotice',
data() {
return {
dialogShow: false,
loading: false,
operate: null,
name: '',
msg: ''
}
import { OperationEvent } from '@/scripts/ConstDic';
export default {
name: 'CmdNotice',
data() {
return {
dialogShow: false,
loading: false,
operate: null,
name: '',
msg: ''
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.close.notice.domId : '';
},
},
watch: {
'$store.state.socket.msgHead': function (elem) {
if (elem && (elem.hasOwnProperty('success') || elem.hasOwnProperty('timeout'))) {
let operate = this.$store.state.training.operate;
let control = this.$store.getters['map/getDeviceByCode'](elem.stationControlCode);
let station = this.$store.getters['map/getDeviceByCode'](control.stationCode);
let newOperate = {
type: operate.type,
name: station.name,
}
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.close.notice.domId : '';
}
},
watch: {
'$store.state.socket.msgHead': function (elem) {
if (elem && (elem.hasOwnProperty('success') || elem.hasOwnProperty('timeout'))) {
const operate = this.$store.state.training.operate;
const control = this.$store.getters['map/getDeviceByCode'](elem.stationControlCode);
const station = this.$store.getters['map/getDeviceByCode'](control.stationCode);
const newOperate = {
type: operate.type,
name: station.name
};
if (elem.timeout) {
newOperate['msg'] = '请求超时';
this.doShow(newOperate);
} else if (!elem.success) {
newOperate['msg'] = '请求拒绝';
this.doShow(newOperate);
}
if (elem.timeout) {
newOperate['msg'] = '请求超时';
this.doShow(newOperate);
} else if (!elem.success) {
newOperate['msg'] = '请求拒绝';
this.doShow(newOperate);
}
},
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate) {
this.operate = operate || {};
this.name = this.operate.name || '';
this.msg = this.operate.msg || '';
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
if (this.dialogShow) {
this.$store.dispatch('socket/shiftMsgQueue');
}
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
cancel() {
let operate = {
operation: this.operate.type,
operation: OperationEvent.Command.close.notice.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {
this.doClose();
}
})
},
commit() {
let operate = {
type: this.operate.type,
operation: OperationEvent.Command.close.notice.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {
this.doClose();
}
})
},
isClose() {
return this.dialogShow;
}
}
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate) {
this.operate = operate || {};
this.name = this.operate.name || '';
this.msg = this.operate.msg || '';
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
if (this.dialogShow) {
this.$store.dispatch('socket/shiftMsgQueue');
}
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
cancel() {
const operate = {
operation: OperationEvent.Command.close.notice.operation
};
</script>
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {
this.doClose();
}
});
},
commit() {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.close.notice.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {
this.doClose();
}
});
},
isClose() {
return this.dialogShow;
}
}
};
</script>

View File

@ -292,12 +292,12 @@ export default {
operateType: 'Section_Set_Limit_Speed',
skinCode: '06',
trainingName: '设置临时限速({8}{9})',
trainingRemark: '设置临时限速功能(限速值:自动',
trainingRemark: '设置临时限速功能(限速值:不限速',
trainingType: 'Section',
productTypes: ['02'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '407', tip: '鼠标右键菜单选择【设置临时限速】' },
{ deviceType: '03', orderNum: 2, operateCode: '4076', tip: '鼠标左键选择【限速值自动】', val: '0' },
{ deviceType: '03', orderNum: 2, operateCode: '4076', tip: '鼠标左键选择【限速】', val: '0' },
{ deviceType: '03', orderNum: 3, operateCode: '4071', tip: '鼠标左键点击【下达】按钮' },
{ deviceType: '03', orderNum: 4, operateCode: '4072', tip: '鼠标左键点击【确认】按钮' },
{ deviceType: '03', orderNum: 5, operateCode: '4073', tip: '鼠标左键点击【确认1】按钮' },