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-button class="expand" @click="expandPath">展开进路预览</el-button> -->
</el-col> </el-col>
</el-row> </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-column :id="domIdChoose" prop="name" style="margin-left:30px" />
</el-table> </el-table>
<el-row justify="center" class="button-group"> <el-row justify="center" class="button-group">

View File

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

View File

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

View File

@ -1,207 +1,213 @@
<template> <template>
<el-dialog class="ningbo-01__systerm alarm-detail" :title="level+'级告警详细信息'" :visible.sync="show" width="760px" <el-dialog
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag> v-dialogDrag
<el-form label-width="80px" size="mini"> class="ningbo-01__systerm alarm-detail"
<el-row> :title="level+'级告警详细信息'"
<el-col :span="8"> :visible.sync="show"
<el-form-item label="线路名称"> width="760px"
<el-input v-model="model.lineName" disabled></el-input> :before-close="doClose"
</el-form-item> :z-index="2000"
</el-col> :modal="false"
<el-col :span="8"> :close-on-click-modal="false"
<el-form-item label="单位名称"> >
<el-input v-model="model.unitName" disabled></el-input> <el-form label-width="80px" size="mini">
</el-form-item> <el-row>
</el-col> <el-col :span="8">
<el-col :span="8"> <el-form-item label="线路名称">
<el-form-item label="模块名称"> <el-input v-model="model.lineName" disabled />
<el-input v-model="model.moduleName" disabled></el-input> </el-form-item>
</el-form-item> </el-col>
</el-col> <el-col :span="8">
</el-row> <el-form-item label="单位名称">
<el-row> <el-input v-model="model.unitName" disabled />
<el-col :span="9"> </el-form-item>
<el-form-item label="报警时间"> </el-col>
<el-date-picker v-model="model.alarmDate" type="datetime" placeholder="选择日期时间" disabled> <el-col :span="8">
</el-date-picker> <el-form-item label="模块名称">
</el-form-item> <el-input v-model="model.moduleName" disabled />
</el-col> </el-form-item>
<el-col :span="7"> </el-col>
<el-form-item> </el-row>
<span slot="label">&emsp;</span> <el-row>
<el-input v-model="model.level" disabled></el-input> <el-col :span="9">
</el-form-item> <el-form-item label="报警时间">
</el-col> <el-date-picker v-model="model.alarmDate" type="datetime" placeholder="选择日期时间" disabled />
<el-col :span="8"> </el-form-item>
<el-form-item label="确认状态"> </el-col>
<el-input v-model="model.confirm" disabled></el-input> <el-col :span="7">
</el-form-item> <el-form-item>
</el-col> <span slot="label">&emsp;</span>
</el-row> <el-input v-model="model.level" disabled />
<el-row> </el-form-item>
<el-col :span="9" class="alarm-type"> </el-col>
<el-form-item> <el-col :span="8">
<span slot="label">&emsp;&emsp;</span> <el-form-item label="确认状态">
<el-input v-model="model.type" disabled></el-input> <el-input v-model="model.confirm" disabled />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="15" class="alarm-child-type"> </el-row>
<el-form-item label="子类型"> <el-row>
<el-input v-model="model.childType" disabled></el-input> <el-col :span="9" class="alarm-type">
</el-form-item> <el-form-item>
</el-col> <span slot="label">&emsp;&emsp;</span>
</el-row> <el-input v-model="model.type" disabled />
<el-form-item label="时间摘要"> </el-form-item>
<el-input v-model="model.timeSummary" disabled></el-input> </el-col>
</el-form-item> <el-col :span="15" class="alarm-child-type">
<el-form-item label="推荐操作"> <el-form-item label="子类型">
<el-input v-model="model.recommendedOperation" disabled></el-input> <el-input v-model="model.childType" disabled />
</el-form-item> </el-form-item>
<div class="alarm-detail-description"> </el-col>
<span> 报警详细描述</span><br> </el-row>
<el-input type="textarea" :rows="5" placeholder="请输入内容" v-model="model.alarmDetail" disabled> <el-form-item label="时间摘要">
</el-input> <el-input v-model="model.timeSummary" disabled />
</div> </el-form-item>
</el-form> <el-form-item label="推荐操作">
<el-row class="button-group"> <el-input v-model="model.recommendedOperation" disabled />
<el-col :span="3" :offset="9"> </el-form-item>
<el-button :id="domIdCancel" type="primary" :loading="loading" @click="commit"> </el-button> <div class="alarm-detail-description">
</el-col> <span> 报警详细描述</span><br>
<el-col :span="10"> <el-input v-model="model.alarmDetail" type="textarea" :rows="5" placeholder="请输入内容" disabled />
<span style="line-height:26px">未确认{{level}}级报警数目1</span> </div>
</el-col> </el-form>
</el-row> <el-row class="button-group">
</el-dialog> <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> </template>
<script> <script>
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic'; import { OperationEvent } from '@/scripts/ConstDic';
export default { export default {
name: 'AlarmDetail', name: 'AlarmDetail',
data() { data() {
return { return {
dialogShow: false, dialogShow: false,
loading: false, loading: false,
level: 0, level: 0,
operate: null, operate: null,
controlProps: { controlProps: {
'01': '中控', '01': '中控',
'02': '站控' '02': '站控'
}, },
model: { model: {
lineName: '', lineName: '',
unitName: '', unitName: '',
moduleName: '', moduleName: '',
level: '', level: '',
confirm: '', confirm: '',
alarmDate: '', alarmDate: '',
type: '', type: '',
childType: '', childType: '',
timeSummary: '', timeSummary: '',
recommendedOperation: '', recommendedOperation: '',
alarmDetail: '' alarmDetail: ''
}
} }
};
},
computed: {
...mapGetters('map', [
'name'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
}, },
computed: { domIdCancel() {
...mapGetters('map', [ return this.dialogShow ? OperationEvent.Command.close.alarm.domId : '';
'name', }
]), },
show() { watch: {
return this.dialogShow && !this.$store.state.menuOperation.break; '$store.state.socket.msgHead': function (elem) {
}, if (elem && elem.hasOwnProperty('success')) {
domIdCancel() { if (elem.success) {
return this.dialogShow ? OperationEvent.Command.close.alarm.domId : ''; 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);
watch: { const newOperate = {
'$store.state.socket.msgHead': function (elem) { type: operate.type,
if (elem && elem.hasOwnProperty('success')) { name: station.name
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,
}
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> </script>
<style rel="stylesheet/scss" lang="scss" scoped> <style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss"; @import "src/styles/mixin.scss";
.alarm-type .el-input { .alarm-type .el-input {
width: 220px; width: 220px;
} }

View File

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

View File

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