Merge branch 'dev' into test

This commit is contained in:
zyy 2020-03-20 13:08:35 +08:00
commit 473d60ca0c
19 changed files with 752 additions and 911 deletions

View File

@ -596,7 +596,7 @@ export default {
reentrySection2: '折返区段2', reentrySection2: '折返区段2',
setPriority: '设置优先级', setPriority: '设置优先级',
associatedStationList: '关联站台列表:', associatedStationList: '关联站台列表:',
whetherAutoRoute: '是否自进路', whetherAutoRoute: '是否自进路',
hostileData: '敌对数据', hostileData: '敌对数据',
routeContinuesToProtectSectorData: '进路延续保护区段数据', routeContinuesToProtectSectorData: '进路延续保护区段数据',
physicalSectionID: '物理区段ID', physicalSectionID: '物理区段ID',

View File

@ -135,6 +135,33 @@ class Status {
handleResource(device) { handleResource(device) {
this.statusObj = { }; this.statusObj = { };
} }
handleAtsControl(device) {
this.statusObj = {};
}
handleCenterCommunication(device) {
this.statusObj = {};
}
handleChainControl(device) {
this.statusObj = {};
}
handleIntersiteControl(device) {
this.statusObj = {};
}
handleLeuControl(device) {
this.statusObj = {};
}
handleLocalControl(device) {
this.statusObj = {};
}
handleMaintain(device) {
this.statusObj = {};
}
handlePowerSupply(device) {
this.statusObj = {};
}
handleNoOneReturn(device) {
this.statusObj = {};
}
getStatus() { getStatus() {
return this.statusObj; return this.statusObj;
} }

View File

@ -1,7 +1,6 @@
/* /*
* 信号机 * 信号机
*/ */
import ESigPost from './ESigPost'; import ESigPost from './ESigPost';
import ESigLamp from './ESigLamp'; import ESigLamp from './ESigLamp';
import ESigAuto from './ESigAuto'; import ESigAuto from './ESigAuto';

View File

@ -79,8 +79,10 @@ export default {
}, },
title() { title() {
if (this.operation == OperationEvent.Section.split.menu.operation) { if (this.operation == OperationEvent.Section.split.menu.operation) {
this.radio = '2';
return '区段控制'; return '区段控制';
} else if (this.operation == OperationEvent.Section.active.menu.operation) { } else if (this.operation == OperationEvent.Section.active.menu.operation) {
this.radio = '1';
return '区段控制'; return '区段控制';
} else if (this.operation == OperationEvent.Section.fault.menu.operation) { } else if (this.operation == OperationEvent.Section.fault.menu.operation) {
return '区故解'; return '区故解';

View File

@ -1,7 +1,16 @@
<template> <template>
<div> <div>
<el-dialog class="beijing-01__systerm section-cmd-speed" :title="title" :visible.sync="show" width="800px" <el-dialog
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag> v-dialogDrag
class="beijing-01__systerm section-cmd-speed"
:title="title"
:visible.sync="show"
width="800px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div style="padding: 10px 20px; border: 1px solid lightgray;"> <div style="padding: 10px 20px; border: 1px solid lightgray;">
<span class="base-label">命令信息</span> <span class="base-label">命令信息</span>
<el-form label-position="center" size="mini"> <el-form label-position="center" size="mini">
@ -9,51 +18,67 @@
<el-col :span="6"> <el-col :span="6">
<el-form-item label="类型" label-width="40px"> <el-form-item label="类型" label-width="40px">
<el-select v-model="operation" size="small" disabled> <el-select v-model="operation" size="small" disabled>
<el-option v-for="option in typeList" :key="option.code" :label="option.name" <el-option
:value="option.code"> v-for="option in typeList"
</el-option> :key="option.code"
:label="option.name"
:value="option.code"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="车站名称" label-width="80px"> <el-form-item label="车站名称" label-width="80px">
<el-input v-model="stationName" size="small" disabled></el-input> <el-input v-model="stationName" size="small" disabled />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="nameLabel" label-width="80px"> <el-form-item :label="nameLabel" label-width="80px">
<el-input v-model="name" size="small" disabled></el-input> <el-input v-model="name" size="small" disabled />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="限速值" label-width="80px"> <el-form-item label="限速值" label-width="80px">
<el-select v-model="speed" :id="domIdChoose" size="small" :disabled="spdDisabled" <el-select
@change="speedSelectChange"> :id="domIdChoose"
<el-option v-for="item in speedList" :key="item.value" :label="item.name" v-model="speed"
:value="item.value"> size="small"
</el-option> :disabled="spdDisabled"
@change="speedSelectChange"
>
<el-option
v-for="item in speedList"
:key="item.value"
:label="item.name"
:value="item.value"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
</div> </div>
<el-table class="table" ref="table" :data="tableData" border style="width: 100%" size="mini" <el-table
highlight-current-row height="200"> ref="table"
<el-table-column prop="order" :width="50" label="序号"> class="table"
</el-table-column> :data="tableData"
<el-table-column prop="date" :width="160" label="时间"> border
</el-table-column> style="width: 100%"
<el-table-column prop="context" :width="180" label="执行过程"> size="mini"
</el-table-column> highlight-current-row
<el-table-column prop="result" label="执行结果"> height="200"
</el-table-column> >
<el-table-column prop="order" :width="50" label="序号" />
<el-table-column prop="date" :width="160" label="时间" />
<el-table-column prop="context" :width="180" label="执行过程" />
<el-table-column prop="result" label="执行结果" />
</el-table> </el-table>
<span class="notice">{{message}}</span> <span class="notice">{{ message }}</span>
<el-row class="button-group"> <el-row class="button-group">
<el-col :span="2" :offset="2"> <el-col :span="2" :offset="2">
<el-button :id="domIdCommand" type="primary" :disabled="cmdDisabled[0]" @click="command">下达<span <el-button :id="domIdCommand" type="primary" :disabled="cmdDisabled[0]" @click="command">下达<span
v-show="timeCountCommand>0">({{timeCountCommand}})</span></el-button> v-show="timeCountCommand>0"
>({{ timeCountCommand }})</span></el-button>
</el-col> </el-col>
<el-col :span="2" :offset="2"> <el-col :span="2" :offset="2">
<el-button :id="domIdConfirm1" type="primary" :disabled="cmdDisabled[1]" @click="confirm1">确认1 <el-button :id="domIdConfirm1" type="primary" :disabled="cmdDisabled[1]" @click="confirm1">确认1
@ -61,7 +86,8 @@
</el-col> </el-col>
<el-col :span="2" :offset="2"> <el-col :span="2" :offset="2">
<el-button :id="domIdConfirm2" type="primary" :disabled="cmdDisabled[2]" @click="confirm2">确认2<span <el-button :id="domIdConfirm2" type="primary" :disabled="cmdDisabled[2]" @click="confirm2">确认2<span
v-show="timeCountConfirm>0">({{timeCountConfirm}})</span></el-button> v-show="timeCountConfirm>0"
>({{ timeCountConfirm }})</span></el-button>
</el-col> </el-col>
<el-col :span="2" :offset="2"> <el-col :span="2" :offset="2">
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">中止</el-button> <el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">中止</el-button>
@ -71,7 +97,7 @@
</el-col> </el-col>
</el-row> </el-row>
</el-dialog> </el-dialog>
<confirm-control-speed ref="confirmControlSpeed" @setOperate="getOperate"></confirm-control-speed> <confirm-control-speed ref="confirmControlSpeed" @setOperate="getOperate" />
</div> </div>
</template> </template>
<script> <script>
@ -107,7 +133,7 @@ export default {
stationName: '', stationName: '',
name: '', name: '',
speed: '' speed: ''
} };
}, },
computed: { computed: {
nameLabel() { nameLabel() {
@ -117,14 +143,14 @@ export default {
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation || } else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation ||
this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) { this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
return '道岔名称'; return '道岔名称';
}else{ } else {
return ''; return '';
} }
}, },
speedList() { speedList() {
let list = [{ name: '不限速', value: '-1' }]; const list = [{ name: '不限速', value: '-1' }];
for (var i = 0; i * this.speedSpace <= this.maxSpeed; i++) { for (var i = 0; i * this.speedSpace <= this.maxSpeed; i++) {
let speed = String(i * this.speedSpace); const speed = String(i * this.speedSpace);
list.push({ name: speed, value: speed }); list.push({ name: speed, value: speed });
} }
return list; return list;
@ -134,8 +160,8 @@ export default {
{ code: OperationEvent.Section.setSpeed.menu.operation, name: '区段设置限速' }, { code: OperationEvent.Section.setSpeed.menu.operation, name: '区段设置限速' },
{ code: OperationEvent.Section.cancelSpeed.menu.operation, name: '区段取消限速' }, { code: OperationEvent.Section.cancelSpeed.menu.operation, name: '区段取消限速' },
{ code: OperationEvent.Switch.setSpeed.menu.operation, name: '区段设置限速' }, { code: OperationEvent.Switch.setSpeed.menu.operation, name: '区段设置限速' },
{ code: OperationEvent.Switch.cancelSpeed.menu.operation, name: '区段取消限速' }, { code: OperationEvent.Switch.cancelSpeed.menu.operation, name: '区段取消限速' }
] ];
}, },
title() { title() {
if (this.dialogShow) { if (this.dialogShow) {
@ -264,9 +290,9 @@ export default {
} }
}, },
isCancelSpeed() { isCancelSpeed() {
return this.operation == OperationEvent.Section.cancelSpeed.menu.operation return this.operation == OperationEvent.Section.cancelSpeed.menu.operation ||
|| this.operation == OperationEvent.Switch.cancelSpeed.menu.operation this.operation == OperationEvent.Switch.cancelSpeed.menu.operation;
}, }
}, },
watch: { watch: {
cmdDisabled: { cmdDisabled: {
@ -294,7 +320,7 @@ export default {
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.$store.dispatch('training/tipReload'); this.$store.dispatch('training/tipReload');
}) });
this.timer = setInterval(() => { this.timer = setInterval(() => {
if (!this.$store.state.menuOperation.break) { if (!this.$store.state.menuOperation.break) {
if (this.timeCountCommand > 0) { if (this.timeCountCommand > 0) {
@ -310,7 +336,7 @@ export default {
this.timeCountConfirm = -1; this.timeCountConfirm = -1;
} }
} }
}, 1000) }, 1000);
}, },
beforeDestroy() { beforeDestroy() {
clearInterval(this.timer); clearInterval(this.timer);
@ -326,20 +352,20 @@ export default {
operate.operation == OperationEvent.Section.cancelSpeed.menu.operation) { operate.operation == OperationEvent.Section.cancelSpeed.menu.operation) {
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) { if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
if (selected.type === '02') { if (selected.type === '02') {
let section = this.$store.getters['map/getDeviceByCode'](selected.parentCode); const section = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
if (section) { if (section) {
this.name += section.name this.name += section.name;
} }
} }
this.name += selected.name this.name += selected.name;
} }
} else if (operate.operation == OperationEvent.Switch.setSpeed.menu.operation) { } else if (operate.operation == OperationEvent.Switch.setSpeed.menu.operation) {
if (selected._type.toUpperCase() === 'Switch'.toUpperCase()) { if (selected._type.toUpperCase() === 'Switch'.toUpperCase()) {
this.name = selected.name this.name = selected.name;
} }
} }
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode); const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) { if (station) {
this.stationName = station.name; this.stationName = station.name;
} }
@ -373,17 +399,17 @@ export default {
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
}, },
speedSelectChange(val) { speedSelectChange(val) {
let operate = { const operate = {
type: this.type, type: this.type,
val: val, val: val
} };
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) { if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
/** 区段设置限速*/ /** 区段设置限速*/
operate.operation = OperationEvent.Section.setSpeed.choose.operation operate.operation = OperationEvent.Section.setSpeed.choose.operation;
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation) { } else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation) {
/** 道岔设置限速*/ /** 道岔设置限速*/
operate.operation = OperationEvent.Switch.setSpeed.choose.operation operate.operation = OperationEvent.Switch.setSpeed.choose.operation;
} }
this.setMessage('请点击“下达”按钮,下达命令!'); this.setMessage('请点击“下达”按钮,下达命令!');
@ -392,12 +418,12 @@ export default {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.setButtonEnable({ step: 0 }); this.setButtonEnable({ step: 0 });
} }
}) });
}, },
command() { command() {
let operate = { const operate = {
type: this.type, type: this.type
} };
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) { if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
/** 区段设置限速*/ /** 区段设置限速*/
@ -429,12 +455,12 @@ export default {
} }
}).catch(() => { }).catch(() => {
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行异常' }); this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行异常' });
}) });
}, },
confirm1() { confirm1() {
let operate = { const operate = {
type: this.type, type: this.type
} };
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) { if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
/** 区段设置限速*/ /** 区段设置限速*/
@ -464,17 +490,17 @@ export default {
} }
}).catch(() => { }).catch(() => {
this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行异常' }); this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行异常' });
}) });
}, },
confirm2() { confirm2() {
let operate = { const operate = {
over:true, over:true,
type: this.type, type: this.type,
val: this.speed, val: this.speed,
param: { param: {
speedLimitValue: `${this.speed}` speedLimitValue: `${this.speed}`
} }
} };
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) { if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
/** 区段设置限速*/ /** 区段设置限速*/
@ -509,12 +535,12 @@ export default {
this.timeCountConfirm = -1; this.timeCountConfirm = -1;
this.setButtonEnable({ step: -1 }); this.setButtonEnable({ step: -1 });
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行异常' }); this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行异常' });
}) });
}, },
stop() { stop() {
let operate = { const operate = {
type: this.type, type: this.type
} };
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) { if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
/** 区段设置限速*/ /** 区段设置限速*/
@ -541,13 +567,13 @@ export default {
} }
}).catch(() => { }).catch(() => {
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行异常' }); this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行异常' });
}) });
}, },
close() { close() {
let operate = { const operate = {
type: this.type, type: this.type,
operation: OperationEvent.Command.close.menu.operation, operation: OperationEvent.Command.close.menu.operation
} };
this.writeRecord({ order: ++this.order, date: now(), context: '点击关闭', result: '' }); this.writeRecord({ order: ++this.order, date: now(), context: '点击关闭', result: '' });
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { if (valid) {
@ -581,8 +607,8 @@ export default {
elem[prop] = param[prop]; elem[prop] = param[prop];
} }
} }
}) });
} }
} }
} };
</script> </script>

View File

@ -20,7 +20,7 @@ import { DeviceMenu } from '@/scripts/ConstDic';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import CMD from '@/scripts/cmdPlugin/CommandEnum'; import CMD from '@/scripts/cmdPlugin/CommandEnum';
import {menuOperate} from './utils/menuOperate'; import {menuOperate, commitOperate} from './utils/menuOperate';
export default { export default {
name: 'SectionMenu', name: 'SectionMenu',
@ -173,7 +173,7 @@ export default {
// }, // },
// //
faultUnlock(selectType) { faultUnlock(selectType) {
this.commitOperate(menuOperate.Section.fault, selectType, [selectType.code]).then((data)=>{ commitOperate(menuOperate.Section.fault, selectType, [selectType.code]).then((data)=>{
this.$refs.sectionControl.doShow(data.operate, data.selected); this.$refs.sectionControl.doShow(data.operate, data.selected);
}); });
}, },
@ -187,56 +187,37 @@ export default {
}, },
// //
split() { split() {
this.commitOperate(menuOperate.Section.split, this.selected, [this.selected.code]).then((data)=>{ commitOperate(menuOperate.Section.split, {sectionCode:this.selected.code}, 0).then((data)=>{
this.$refs.sectionControl.doShow(data.operate, data.selected); this.$refs.sectionControl.doShow(data.operate, this.selected);
}); });
}, },
alxeEffective() { alxeEffective() {
this.commitOperate(menuOperate.Section.alxeEffective, this.selected, [this.selected.code]).then((data)=>{ commitOperate(menuOperate.Section.alxeEffective, {sectionCode:this.selected.code}, 0).then((data)=>{
this.$refs.alxeEffective.doShow(data.operate, data.selected); this.$refs.alxeEffective.doShow(data.operate, this.selected);
}); });
}, },
// //
active() { active() {
this.commitOperate(menuOperate.Section.active, this.selected, [this.selected.code]).then((data)=>{ commitOperate(menuOperate.Section.active, {sectionCode:this.selected.code}, 0).then((data)=>{
this.$refs.sectionControl.doShow(data.operate, data.selected); this.$refs.sectionControl.doShow(data.operate, this.selected);
}); });
}, },
// //
axlePreReset(selectType) { axlePreReset(selectType) {
this.commitOperate(menuOperate.Section.axlePreReset, selectType, [selectType.code]).then((data)=>{ commitOperate(menuOperate.Section.axlePreReset, {sectionCode:selectType.code}, 0).then((data)=>{
this.$refs.sectionControl.doShow(data.operate, data.selected); this.$refs.sectionControl.doShow(data.operate, selectType);
}); });
}, },
// //
// axlePreReset() { // axlePreReset() {
// this.commitOperate(menuOperate.Section.axlePreReset, this.selected, [this.selected.code]).then((data)=>{ // this.commitOperate(menuOperate.Section.axlePreReset, {sectionCode:this.selected.code},0).then((data)=>{
// this.$refs.sectionCmdControl.doShow(data.operate, data.selected); // this.$refs.sectionCmdControl.doShow(data.operate, this.selected);
// }); // });
// }, // },
// //
setSpeed() { setSpeed() {
this.commitOperate(menuOperate.Section.setSpeed, this.selected, [this.selected.code]).then((data)=>{ commitOperate(menuOperate.Section.setSpeed, {sectionCode:this.selected.code}, 0).then((data)=>{
this.$refs.speedLimitControl.doShow(data.operate, data.selected); this.$refs.speedLimitControl.doShow(data.operate, this.selected);
});
},
commitOperate(operate, selected, paramList) {
const step = {
start: true,
operation: operate.operation,
param:{}
};
operate.param.forEach((each, index)=>{
step.param[each] = paramList[index];
});
const obj = this;
return new Promise(function(resolve, reject) {
obj.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
obj.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
resolve({operate:step, selected:selected});
}
});
}); });
} }
} }

View File

@ -25,6 +25,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu } from '@/scripts/ConstDic'; import { DeviceMenu } from '@/scripts/ConstDic';
import { mouseCancelState } from './utils/menuItemStatus'; import { mouseCancelState } from './utils/menuItemStatus';
import PasswordBox from './dialog/childDialog/passwordInputBox.vue'; import PasswordBox from './dialog/childDialog/passwordInputBox.vue';
import {menuOperate, commitOperate} from './utils/menuOperate';
export default { export default {
name: 'SignalMenu', name: 'SignalMenu',
@ -294,7 +295,6 @@ export default {
} }
}; };
mouseCancelState(this.selected); mouseCancelState(this.selected);
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { if (valid) {
@ -332,279 +332,105 @@ export default {
}, },
// //
arrangementRoute() { arrangementRoute() {
const operate = { commitOperate(menuOperate.Signal.arrangementRoute, {signalCode:this.selected.code}, 0).then((data)=>{
start: true, this.$refs.routeSelection.doShow(data.operate, this.selected, this.getRouteList(this.selected));
code: this.selected.code,
operation: OperationEvent.Signal.arrangementRoute.menu.operation
// param: {
// signalCode: `${this.selected.code}`
// }
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {
const routes = [];
this.routeList.forEach(elem => {
if (elem.startSignalCode === this.selected.code) {
routes.push(elem);
}
});
this.$refs.routeSelection.doShow(operate, this.selected, routes);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
}); });
}, },
// //
setRoute(route) { setRoute(route) {
const operate = { commitOperate(menuOperate.Signal.arrangementRoute, {routeCode:route.code}, [], 3).then((data)=>{
start: true, }).catch(error=>{
code: this.selected.code, this.$refs.noticeInfo.doShow({}, error.message);
operation: OperationEvent.Signal.arrangementRoute.menu.operation,
param: {
routeCode: route.code
},
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}).catch((error) => {
this.$refs.noticeInfo.doShow(operate, error.message);
}); });
}, },
// //
cancelTrainRoute() { cancelTrainRoute() {
const operate = { commitOperate(menuOperate.Signal.cancelTrainRoute, {signalCode:this.selected.code}, 0).then((data)=>{
start: true, this.$refs.routeControl.doShow(data.operate, this.selected);
code: this.selected.code,
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
param: {
signalCode: `${this.selected.code}`
}
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {
this.$refs.routeControl.doShow(operate, this.selected);
}
}); });
}, },
// //
cancelTrainRouteByLow(selectType) { cancelTrainRouteByLow(selectType) {
const operate = { commitOperate(menuOperate.Signal.cancelTrainRoute, {signalCode:selectType.code}, 3).then((data)=>{
start: true, }).catch(error=>{
code: this.selected.code, this.$refs.noticeInfo.doShow({}, error.message);
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
param: {
signalCode: selectType.code
},
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch((error) => {
this.$refs.noticeInfo.doShow(operate, error.message);
}); });
}, },
// //
humanTrainRoute(selectType) { humanTrainRoute(selectType) {
const step = { commitOperate(menuOperate.Signal.humanTrainRoute, {signalCode:selectType.code}, 0).then((data)=>{
start: true, data.operate.cmdType = CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE;
code: `${this.selected.code}`, this.$refs.password.doShow(data.operate);
operation: OperationEvent.Signal.humanTrainRoute.menu.operation,
param: {
signalCode: `${this.selected.code}`
}
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {
step.cmdType = CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE;
this.$refs.password.doShow(step);
}
}); });
}, },
// //
reopenSignalByRoute(selectType) { reopenSignalByRoute(selectType) {
const operate = { commitOperate(menuOperate.Signal.reopenSignal, {signalCode:selectType.code}, 3).then((data)=>{
start: true, }).catch(error=>{
code: this.selected.code, this.$refs.noticeInfo.doShow({}, error.message);
operation: OperationEvent.Signal.reopenSignal.menu.operation,
param: {
signalCode: selectType.code
},
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch((error) => {
this.$refs.noticeInfo.doShow(operate, error.message);
}); });
}, },
// //
reopenSignal() { reopenSignal() {
const operate = { commitOperate(menuOperate.Signal.reopenSignal, {signalCode:this.selected.code}, 0).then((data)=>{
start: true, this.$refs.routeControl.doShow(data.operate, this.selected);
code: this.selected.code,
operation: OperationEvent.Signal.reopenSignal.menu.operation,
param: {
signalCode: `${this.selected.code}`
}
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.routeControl.doShow(operate, this.selected);
}
}); });
}, },
// //
signalClose() { signalClose() {
const operate = { commitOperate(menuOperate.Signal.signalClose, {signalCode:this.selected.code}, 0).then((data)=>{
start: true, this.$refs.routeControl.doShow(data.operate, this.selected);
code: this.selected.code,
operation: OperationEvent.Signal.signalClose.menu.operation,
param: {
signalCode: `${this.selected.code}`
}
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.routeControl.doShow(operate, this.selected);
}
}); });
}, },
// //
signalCloseByLow(selectType) { signalCloseByLow(selectType) {
const operate = { commitOperate(menuOperate.Signal.signalClose, {signalCode:selectType.code}, 3).then((data)=>{
start: true, }).catch(error=>{
code: this.selected.code, this.$refs.noticeInfo.doShow({}, error.message);
operation: OperationEvent.Signal.signalClose.menu.operation,
param: {
signalCode: selectType.code
},
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch((error) => {
this.$refs.noticeInfo.doShow(operate, error.message);
}); });
}, },
// //
humanControl() { humanControl() {
const operate = { commitOperate(menuOperate.Signal.humanControl, {signalCode:this.selected.code}, 0).then((data)=>{
start: true, this.$refs.routeHandControl.doShow(data.operate, this.selected, this.getRouteList(this.selected));
code: this.selected.code,
operation: OperationEvent.Signal.humanControl.menu.operation,
param: {
signalCode: `${this.selected.code}`
}
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
const routes = [];
this.routeList.forEach(elem => {
if (elem.startSignalCode === this.selected.code) {
routes.push(elem);
}
});
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.routeHandControl.doShow(operate, this.selected, routes);
}
}); });
}, },
// //
atsAutoControl() { atsAutoControl() {
const operate = { commitOperate(menuOperate.Signal.atsAutoControl, {signalCode:this.selected.code}, 0).then((data)=>{
start: true, this.$refs.routeHandControl.doShow(data.operate, this.selected, this.getRouteList(this.selected));
code: this.selected.code,
operation: OperationEvent.Signal.atsAutoControl.menu.operation,
param: {
signalCode: `${this.selected.code}`
}
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
const routes = [];
this.routeList.forEach(elem => {
if (elem.startSignalCode === this.selected.code) {
routes.push(elem);
}
});
this.$refs.routeHandControl.doShow(operate, this.selected, routes);
}
}); });
}, },
// //
singalPassModel(selectType) { singalPassModel(selectType) {
const operate = { commitOperate(menuOperate.Signal.setAutoInterlock, {signalCode:selectType.code}, 3).then((data)=>{
start: true, }).catch(error=>{
over: true, this.$refs.noticeInfo.doShow({}, error.message);
operation: OperationEvent.Signal.setAutoInterlock.menu.operation,
param: {
signalCode:selectType.code
},
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch(error => {
this.$refs.noticeInfo.doShow(operate, error.message);
}); });
}, },
// //
singalCancelPassModel(selectType) { singalCancelPassModel(selectType) {
const operate = { commitOperate(menuOperate.Signal.cancelAutoInterlock, {signalCode:selectType.code}, 3).then((data)=>{
start: true, }).catch(error=>{
over: true, this.$refs.noticeInfo.doShow({}, error.message);
operation: OperationEvent.Signal.cancelAutoInterlock.menu.operation,
param: {
signalCode:selectType.code
},
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch(error => {
this.$refs.noticeInfo.doShow(operate, error.message);
}); });
}, },
// //
detail() { detail() {
const step = { commitOperate(menuOperate.Signal.detail, {signalCode:this.selected.code}, 0).then((data)=>{
start: true, this.$refs.routeDetail.doShow(data.operate, this.selected, this.getRouteList(this.selected));
code: `${this.selected.code}`, });
operation: OperationEvent.Signal.detail.menu.operation, },
param: { //
signalCode: `${this.selected.code}` getRouteList(selectType) {
}
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
const routes = []; const routes = [];
this.routeList.forEach(elem => { this.routeList.forEach(elem => {
if (elem.startSignalCode === this.selected.code) { if (elem.startSignalCode === selectType.code) {
routes.push(elem); routes.push(elem);
} }
}); });
this.$refs.routeDetail.doShow(step, this.selected, routes); return routes;
}
});
}, },
passWordCommit(data) { passWordCommit(data) {
const operate = { const operate = {

View File

@ -23,6 +23,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import CMD from '@/scripts/cmdPlugin/CommandEnum'; import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { mouseCancelState } from './utils/menuItemStatus'; import { mouseCancelState } from './utils/menuItemStatus';
import {menuOperate, commitOperate} from './utils/menuOperate';
export default { export default {
name: 'SwitchMenu', name: 'SwitchMenu',
@ -237,167 +238,63 @@ export default {
}, },
// //
lock(selectType) { lock(selectType) {
const operate = { commitOperate(menuOperate.Switch.lock, {switchCode:selectType.code}, 3).then((data)=>{
start: true, }).catch(error=>{
over: true, this.$refs.noticeInfo.doShow({}, error.message);
operation: OperationEvent.Switch.lock.menu.operation,
param: {
switchCode: selectType.code
},
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch(error => {
this.$refs.noticeInfo.doShow(operate, error.message);
}); });
}, },
// //
unlock(selectType) { unlock(selectType) {
const operate = { commitOperate(menuOperate.Switch.unlock, {switchCode:selectType.code}, 0).then((data)=>{
start: true, this.$refs.switchControl.doShow(data.operate, selectType);
code: this.selected.code, }).catch(error=>{
operation: OperationEvent.Switch.unlock.menu.operation, this.$refs.noticeInfo.doShow({}, error.message);
param: {
switchCode: selectType.code
}
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.switchControl.doShow(operate, selectType);
}
}).catch(error => {
this.$refs.noticeInfo.doShow(operate, error.message);
}); });
}, },
// //
switchTurnoutForce(selectType) { switchTurnoutForce(selectType) {
const operate = { commitOperate(menuOperate.Switch.turnoutForce, {switchCode:selectType.code}, 0).then((data)=>{
start: true, this.$refs.switchControl.doShow(data.operate, selectType);
code: this.selected.code, }).catch(error=>{
operation: OperationEvent.Switch.turnoutForce.menu.operation, this.$refs.noticeInfo.doShow({}, error.message);
param:{
switchCode:selectType.code
}
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.switchControl.doShow(operate, this.selected);
}
}); });
}, },
// //
locate(selectType) { locate(selectType) {
const operate = { commitOperate(menuOperate.Switch.locate, {switchCode:selectType.code}, 3).then((data)=>{
start: true, }).catch(error=>{
over: true, this.$refs.noticeInfo.doShow({}, error.message);
operation: OperationEvent.Switch.locate.menu.operation,
param: {
switchCode: selectType.code
},
cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch(error => {
this.$refs.noticeInfo.doShow(operate, error.message);
}); });
}, },
// //
reverse(selectType) { reverse(selectType) {
const operate = { commitOperate(menuOperate.Switch.reverse, {switchCode:selectType.code}, 3).then((data)=>{
start: true, }).catch(error=>{
over: true, this.$refs.noticeInfo.doShow({}, error.message);
operation: OperationEvent.Switch.reverse.menu.operation,
param: {
switchCode: selectType.code
},
cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch(error => {
this.$refs.noticeInfo.doShow(operate, error.message);
}); });
}, },
// //
split() { split() {
const operate = { commitOperate(menuOperate.Switch.split, {switchCode:this.selected.code}, 0).then((data)=>{
start: true, this.$refs.switchControl.doShow(data.operate, this.selected);
code: this.selected.code,
operation: OperationEvent.Switch.split.menu.operation,
param: {
switchCode: `${this.selected.code}`
}
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.switchControl.doShow(operate, this.selected);
}
}); });
}, },
// //
active() { active() {
const operate = { commitOperate(menuOperate.Switch.active, {switchCode:this.selected.code}, 0).then((data)=>{
start: true, this.$refs.switchControl.doShow(data.operate, this.selected);
code: this.selected.code,
operation: OperationEvent.Switch.active.menu.operation,
param: {
switchCode: `${this.selected.code}`
}
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.switchControl.doShow(operate, this.selected);
}
}); });
}, },
// //
setSpeed() { setSpeed() {
const operate = { commitOperate(menuOperate.Switch.setSpeed, {switchCode:this.selected.code}, 0).then((data)=>{
start: true, this.$refs.speedLimitControl.doShow(data.operate, this.selected);
code: this.selected.code,
operation: OperationEvent.Switch.setSpeed.menu.operation,
param: {
switchCode: `${this.selected.code}`
}
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.speedLimitControl.doShow(operate, this.selected);
}
}); });
}, },
// //
alxeEffective() { alxeEffective() {
const operate = { commitOperate(menuOperate.Switch.alxeEffective, {switchCode:this.selected.code}, 0).then((data)=>{
start: true, this.$refs.alxeEffective.doShow(data.operate, this.selected);
code: this.selected.code,
operation: OperationEvent.Switch.alxeEffective.menu.operation,
param: {
switchCode: `${this.selected.code}`
}
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.alxeEffective.doShow(operate, this.selected);
}
}); });
}, },
undeveloped() { undeveloped() {

View File

@ -1,4 +1,3 @@
import Vue from 'vue';
import store from '@/store'; import store from '@/store';
import CMD from '@/scripts/cmdPlugin/CommandEnum'; import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
@ -9,67 +8,160 @@ export const menuOperate = {
active:{ active:{
// 区段激活 // 区段激活
operation: OperationEvent.Section.active.menu.operation, operation: OperationEvent.Section.active.menu.operation,
param:['sectionCode'],
cmdType: CMD.Section.CMD_SECTION_ACTIVE cmdType: CMD.Section.CMD_SECTION_ACTIVE
}, },
alxeEffective:{ alxeEffective:{
// 确认计轴有效 // 确认计轴有效
operation: OperationEvent.Section.alxeEffective.menu.operation, operation: OperationEvent.Section.alxeEffective.menu.operation,
param:['sectionCode'],
cmdType: CMD.Section.CMD_SECTION_COMFIRMATION_AXLE cmdType: CMD.Section.CMD_SECTION_COMFIRMATION_AXLE
}, },
split:{ split:{
// 区段切除 // 区段切除
operation: OperationEvent.Section.split.menu.operation, operation: OperationEvent.Section.split.menu.operation,
param:['sectionCode'],
cmdType: CMD.Section.CMD_SECTION_CUT_OFF cmdType: CMD.Section.CMD_SECTION_CUT_OFF
}, },
setSpeed:{ setSpeed:{
// 设置速度 // 设置速度
operation: OperationEvent.Section.setSpeed.menu.operation, operation: OperationEvent.Section.setSpeed.menu.operation,
param:['sectionCode'],
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
}, },
axlePreReset:{ axlePreReset:{
// 区段计轴预复位 // 区段计轴预复位
operation: OperationEvent.Section.axlePreReset.menu.operation, operation: OperationEvent.Section.axlePreReset.menu.operation,
param:['sectionCode'],
cmdType: CMD.Section.CMD_SECTION_AXIS_PRE_RESET cmdType: CMD.Section.CMD_SECTION_AXIS_PRE_RESET
}, },
fault:{ fault:{
// 区段故障解锁 // 区段故障解锁
operation: OperationEvent.Section.fault.menu.operation, operation: OperationEvent.Section.fault.menu.operation,
param:['sectionCode'],
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK
} }
},
Signal:{
arrangementRoute:{
// 排列进路
operation: OperationEvent.Signal.arrangementRoute.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
},
cancelTrainRoute:{
// 取消进路
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
},
humanTrainRoute:{
// 总人解
operation: OperationEvent.Signal.humanTrainRoute.menu.operation,
cmdType:CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE
},
reopenSignal:{
// 信号重开
operation: OperationEvent.Signal.reopenSignal.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
},
signalClose:{
// 信号关灯
operation: OperationEvent.Signal.signalClose.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
},
humanControl:{
// 进路交人工控
operation: OperationEvent.Signal.humanControl.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING
},
atsAutoControl:{
// 进路交自动控
operation: OperationEvent.Signal.atsAutoControl.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
},
setAutoInterlock:{
// 设置通过模式
operation: OperationEvent.Signal.setAutoInterlock.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
},
cancelAutoInterlock:{
// 取消通过模式
operation: OperationEvent.Signal.cancelAutoInterlock.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
},
detail:{
// 查询进路状态
operation: OperationEvent.Signal.detail.menu.operation
}
},
Switch:{
lock:{
// 道岔单锁
operation: OperationEvent.Switch.lock.menu.operation,
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK
},
unlock:{
// 道岔解锁
operation: OperationEvent.Switch.unlock.menu.operation,
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
},
turnoutForce:{
// 道岔强扳
operation: OperationEvent.Switch.turnoutForce.menu.operation
},
locate:{
// 单操到定位
operation: OperationEvent.Switch.locate.menu.operation,
cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION
},
reverse:{
// 单操到反位
operation: OperationEvent.Switch.reverse.menu.operation,
cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION
},
split:{
// 区段切除
operation: OperationEvent.Switch.split.menu.operation,
cmdType: CMD.Switch.CMD_SWITCH_CUT_OFF
},
active:{
// 区段激活
operation: OperationEvent.Switch.active.menu.operation,
cmdType: CMD.Switch.CMD_SWITCH_ACTIVE
},
setSpeed:{
// 设置临时限速
operation: OperationEvent.Switch.setSpeed.menu.operation,
cmdType:CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED
},
alxeEffective:{
// 确认计轴有效
operation: OperationEvent.Switch.alxeEffective.menu.operation,
cmdType: CMD.Switch.CMD_SWITCH_COMFIRMATION_AXLE
}
},
Stand:{
} }
}; };
// export function commitOperate(menuoperate, paramList, selected, callback) { export function commitOperate(operate, paramList, over) {
// return new Promise((resolve, reject) => { const step = {
// try { start: true,
// const operate = { operation: operate.operation,
// start: true, param:{}
// operation: OperationEvent.Section.split.menu.operation, };
// param: { step.param = paramList;
// sectionCode: `${this.selected.code}` // over 0为首次操作1为中间操作2为最后操作3为直接一次性操作
// } if (over != 0 && over != 3) {
// }; delete step.start;
// this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { }
// if (valid) { if (over == 2 || over == 3) {
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); step.over = true;
// resolve(true); step.cmdType = operate.cmdType;
// // callback({operate:operate, selected:selected}); }
// // this.$refs.sectionControl.doShow(operate, this.selected); return new Promise(function(resolve, reject) {
// } store.dispatch('training/nextNew', step).then(({ valid }) => {
// }).catch((error) => { if (valid) {
// this.loading = false; store.dispatch('menuOperation/handleBreakFlag', { break: true });
// this.doClose(); resolve({operate:step});
// this.$refs.noticeInfo.doShow(operate, error.message); }
// }); }).catch(error=>{
// } catch (error) { reject(error);
// reject(error); });
// } });
// }); }
// }

View File

@ -331,16 +331,22 @@ export default {
}); });
} }
} else if (deviceList.length === 2) { } else if (deviceList.length === 2) {
let flag = false;
this.routeList.forEach(item => { this.routeList.forEach(item => {
if (item.startSignalCode === deviceList[0].code && item.endSignalCode === deviceList[1].code) { if (item.startSignalCode === deviceList[0].code && item.endSignalCode === deviceList[1].code) {
operate.cmdType = CMD.Signal.CMD_SIGNAL_SET_ROUTE; operate.cmdType = CMD.Signal.CMD_SIGNAL_SET_ROUTE;
operate.param = {routeCode: item.code}; operate.param = {routeCode: item.code};
this.deviceList = []; this.deviceList = [];
flag = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {}).catch(() => { this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {}).catch(() => {
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
}); });
} }
}); });
if (!flag) {
this.deviceList = [];
this.$refs.noticeInfo.doShow(operate);
}
} }
}, },
handelFunctionButton(model, subType) { handelFunctionButton(model, subType) {
@ -446,30 +452,30 @@ export default {
cmdType: this.cmdType, cmdType: this.cmdType,
param: '' param: ''
}; };
let flag = false;
this.routeList.forEach(item => { this.routeList.forEach(item => {
if (item.startSignalCode === deviceList[0].code && item.endSignalCode === deviceList[1].code) { if (item.startSignalCode === deviceList[0].code && item.endSignalCode === deviceList[1].code) {
operate.param = {routeCode: item.code}; operate.param = {routeCode: item.code};
this.deviceList = []; this.deviceList = [];
flag = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {}).catch(() => { this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {}).catch(() => {
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
}); });
} }
}); });
if (!flag) {
this.deviceList = [];
this.$refs.noticeInfo.doShow(operate);
}
} }
}, },
handleTotalHumanSolution(model) { handleTotalHumanSolution(model) {
let route = '';
this.routeList.forEach(item => {
if (item.startSignalCode === model.code) {
route = item;
}
});
const operate = { const operate = {
send: true, send: true,
operation: this.$store.state.menuOperation.buttonOperation operation: this.$store.state.menuOperation.buttonOperation
}; };
if (this.routeData[route.code].settingGuide) { if (model.yellowOpen && model.redOpen) {
operate.cmdType = CMD.Signal.CMD_SIGNAL_CANCEL_GUIDE; operate.cmdType = CMD.Signal.CMD_SIGNAL_CLOSE_GUIDE;
operate.param = {signalCode: model.code}; operate.param = {signalCode: model.code};
this.deviceList = []; this.deviceList = [];
this.$store.dispatch('training/nextNew', operate).then(({valid, response}) => {}); this.$store.dispatch('training/nextNew', operate).then(({valid, response}) => {});

View File

@ -135,41 +135,38 @@ export function parser(data, skinCode, showConfig) {
mapDevice[elem.code] = createDevice(deviceType.OutFrame, elem, propConvert, showConfig); mapDevice[elem.code] = createDevice(deviceType.OutFrame, elem, propConvert, showConfig);
}, this); }, this);
zrUtil.each(data.atsControlList || [], elem => { zrUtil.each(data.indicatorLightList || [], elem => {
switch (elem.type) {
case 'AtsControl':
mapDevice[elem.code] = createDevice(deviceType.AtsControl, elem, propConvert, showConfig); mapDevice[elem.code] = createDevice(deviceType.AtsControl, elem, propConvert, showConfig);
}); break;
case 'CenterCommunication':
zrUtil.each(data.centerCommunicationList || [], elem => {
mapDevice[elem.code] = createDevice(deviceType.CenterCommunication, elem, propConvert, showConfig); mapDevice[elem.code] = createDevice(deviceType.CenterCommunication, elem, propConvert, showConfig);
}); break;
case 'ChainControl':
zrUtil.each(data.chainControlList || [], elem => {
mapDevice[elem.code] = createDevice(deviceType.ChainControl, elem, propConvert, showConfig); mapDevice[elem.code] = createDevice(deviceType.ChainControl, elem, propConvert, showConfig);
}); break;
case 'IntersiteControl':
zrUtil.each(data.intersiteControlList || [], elem => {
mapDevice[elem.code] = createDevice(deviceType.IntersiteControl, elem, propConvert, showConfig); mapDevice[elem.code] = createDevice(deviceType.IntersiteControl, elem, propConvert, showConfig);
}); break;
case 'LeuControl':
zrUtil.each(data.leuControlList || [], elem => {
mapDevice[elem.code] = createDevice(deviceType.LeuControl, elem, propConvert, showConfig); mapDevice[elem.code] = createDevice(deviceType.LeuControl, elem, propConvert, showConfig);
}); break;
case 'LocalControl':
zrUtil.each(data.localControlList || [], elem => {
mapDevice[elem.code] = createDevice(deviceType.LocalControl, elem, propConvert, showConfig); mapDevice[elem.code] = createDevice(deviceType.LocalControl, elem, propConvert, showConfig);
}); break;
case 'Maintain':
zrUtil.each(data.maintainList || [], elem => {
mapDevice[elem.code] = createDevice(deviceType.Maintain, elem, propConvert, showConfig); mapDevice[elem.code] = createDevice(deviceType.Maintain, elem, propConvert, showConfig);
}); break;
case 'PowerSupply':
zrUtil.each(data.powerSupplyList || [], elem => {
mapDevice[elem.code] = createDevice(deviceType.PowerSupply, elem, propConvert, showConfig); mapDevice[elem.code] = createDevice(deviceType.PowerSupply, elem, propConvert, showConfig);
}); break;
case 'NoOneReturn':
zrUtil.each(data.noOneReturnList || [], elem => {
mapDevice[elem.code] = createDevice(deviceType.NoOneReturn, elem, propConvert, showConfig); mapDevice[elem.code] = createDevice(deviceType.NoOneReturn, elem, propConvert, showConfig);
}); break;
}
}, this);
zrUtil.each(data.trainWindowList || [], elem => { zrUtil.each(data.trainWindowList || [], elem => {
mapDevice[elem.code] = createDevice(deviceType.TrainWindow, elem, propConvert, showConfig); mapDevice[elem.code] = createDevice(deviceType.TrainWindow, elem, propConvert, showConfig);
if (elem.sectionCode) { if (elem.sectionCode) {
@ -266,15 +263,15 @@ export function updateMapData(state, model) {
case deviceType.GuideLock: updateForList(model, state, 'totalGuideLockButtonVOList'); break; case deviceType.GuideLock: updateForList(model, state, 'totalGuideLockButtonVOList'); break;
case deviceType.OutFrame: updateForList(model, state, 'outerFrameList'); break; case deviceType.OutFrame: updateForList(model, state, 'outerFrameList'); break;
case deviceType.AutomaticRoute: updateForList(model, state, 'automaticRouteButtonList'); break; case deviceType.AutomaticRoute: updateForList(model, state, 'automaticRouteButtonList'); break;
case deviceType.AtsControl: updateForList(model, state, 'atsControlList'); break; case deviceType.AtsControl: updateForList(model, state, 'indicatorLightList'); break;
case deviceType.CenterCommunication: updateForList(model, state, 'centerCommunicationList'); break; case deviceType.CenterCommunication: updateForList(model, state, 'indicatorLightList'); break;
case deviceType.ChainControl: updateForList(model, state, 'chainControlList'); break; case deviceType.ChainControl: updateForList(model, state, 'indicatorLightList'); break;
case deviceType.IntersiteControl: updateForList(model, state, 'intersiteControlList'); break; case deviceType.IntersiteControl: updateForList(model, state, 'indicatorLightList'); break;
case deviceType.LeuControl: updateForList(model, state, 'leuControlList'); break; case deviceType.LeuControl: updateForList(model, state, 'indicatorLightList'); break;
case deviceType.LocalControl: updateForList(model, state, 'localControlList'); break; case deviceType.LocalControl: updateForList(model, state, 'indicatorLightList'); break;
case deviceType.Maintain: updateForList(model, state, 'maintainList'); break; case deviceType.Maintain: updateForList(model, state, 'indicatorLightList'); break;
case deviceType.PowerSupply: updateForList(model, state, 'powerSupplyList'); break; case deviceType.PowerSupply: updateForList(model, state, 'indicatorLightList'); break;
case deviceType.NoOneReturn: updateForList(model, state, 'noOneReturnList'); break; case deviceType.NoOneReturn: updateForList(model, state, 'indicatorLightList'); break;
} }
} }
} }

View File

@ -78,8 +78,10 @@ export default {
CMD_SIGNAL_REOPEN_SIGNAL: {value:'Signal_Reopen_Signal', label: '信号重开'}, CMD_SIGNAL_REOPEN_SIGNAL: {value:'Signal_Reopen_Signal', label: '信号重开'},
/** 办理引导 */ /** 办理引导 */
CMD_SIGNAL_ROUTE_GUIDE: {value:'Signal_Set_Guide', label: '办理引导'}, CMD_SIGNAL_ROUTE_GUIDE: {value:'Signal_Set_Guide', label: '办理引导'},
/** 取消引导同时取消进路 */
CMD_SIGNAL_CANCEL_GUIDE: {value:'Signal_Cancel_Guide', label: '取消引导&进路'},
/** 取消引导 */ /** 取消引导 */
CMD_SIGNAL_CANCEL_GUIDE: {value:'Signal_Cancel_Guide', label: '取消引导'}, CMD_SIGNAL_CLOSE_GUIDE: {value: 'Signal_Close_Guide', label: '取消引导'},
/** 进路自排开 */ /** 进路自排开 */
CMD_SIGNAL_OPEN_AUTO_SETTING: {value:'Signal_Open_Auto_Setting', label: '进路自排开'}, CMD_SIGNAL_OPEN_AUTO_SETTING: {value:'Signal_Open_Auto_Setting', label: '进路自排开'},
/** 进路自排关 */ /** 进路自排关 */

View File

@ -361,65 +361,9 @@ const map = {
return []; return [];
} }
}, },
atsControlList: (state) => { indicatorLightList: (state) => {
if (state.map) { if (state.map) {
return state.map.atsControlList || []; return state.map.indicatorLightList || [];
} else {
return [];
}
},
centerCommunicationList: (state) => {
if (state.map) {
return state.map.centerCommunicationList || [];
} else {
return [];
}
},
chainControlList: (state) => {
if (state.map) {
return state.map.chainControlList || [];
} else {
return [];
}
},
intersiteControlList: (state) => {
if (state.map) {
return state.map.intersiteControlList || [];
} else {
return [];
}
},
leuControlList: (state) => {
if (state.map) {
return state.map.leuControlList || [];
} else {
return [];
}
},
powerSupplyList: (state) => {
if (state.map) {
return state.map.powerSupplyList || [];
} else {
return [];
}
},
maintainList: (state) => {
if (state.map) {
return state.map.maintainList || [];
} else {
return [];
}
},
localControlList: (state) => {
if (state.map) {
return state.map.localControlList || [];
} else {
return [];
}
},
noOneReturnList: (state) => {
if (state.map) {
return state.map.noOneReturnList || [];
} else { } else {
return []; return [];
} }

View File

@ -39,7 +39,7 @@
<div v-if="scope.$index == 9" class="table-9-top">状态比较</div> <div v-if="scope.$index == 9" class="table-9-top">状态比较</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="province" width="120"> <el-table-column prop="code" width="120">
<template slot="header"> <template slot="header">
<div style="width: 100%">模式</div> <div style="width: 100%">模式</div>
<div style="width: 100%">编号</div> <div style="width: 100%">编号</div>
@ -47,31 +47,31 @@
</el-table-column> </el-table-column>
<el-table-column label="大系统模式表"> <el-table-column label="大系统模式表">
<el-table-column label="新风机"> <el-table-column label="新风机">
<el-table-column prop="province" label="FAF-1" width="120" /> <el-table-column prop="faf1" label="FAF-1" width="120" />
<el-table-column prop="city" label="FAF-2" width="120" /> <el-table-column prop="faf2" label="FAF-2" width="120" />
</el-table-column> </el-table-column>
<el-table-column label="组合式空调器"> <el-table-column label="组合式空调器">
<el-table-column prop="province" label="AHU-1" width="120" /> <el-table-column prop="ahu1" label="AHU-1" width="120" />
<el-table-column prop="city" label="AHU-2" width="120" /> <el-table-column prop="ahu2" label="AHU-2" width="120" />
</el-table-column> </el-table-column>
<el-table-column label="回排风机"> <el-table-column label="回排风机">
<el-table-column prop="province" label="RAF/SEF-1" width="120" /> <el-table-column prop="raf1" label="RAF/SEF-1" width="120" />
<el-table-column prop="city" label="RAF/SEF-2" width="120" /> <el-table-column prop="raf2" label="RAF/SEF-2" width="120" />
</el-table-column> </el-table-column>
<el-table-column label="风机1"> <el-table-column label="风机1">
<el-table-column prop="province" label="MD-1" width="120" /> <el-table-column prop="md1" label="MD-1" width="120" />
<el-table-column prop="province" label="MD-2" width="120" /> <el-table-column prop="md1" label="MD-2" width="120" />
<el-table-column prop="province" label="MD-3" width="120" /> <el-table-column prop="md1" label="MD-3" width="120" />
<el-table-column prop="province" label="MD-4" width="120" /> <el-table-column prop="md1" label="MD-4" width="120" />
<el-table-column prop="province" label="MD-5" width="120" /> <el-table-column prop="md1" label="MD-5" width="120" />
<el-table-column prop="province" label="MD-6" width="120" /> <el-table-column prop="md1" label="MD-6" width="120" />
<el-table-column prop="province" label="MD-7" width="120" /> <el-table-column prop="md1" label="MD-7" width="120" />
<el-table-column prop="province" label="MD-8" width="120" /> <el-table-column prop="md1" label="MD-8" width="120" />
<el-table-column prop="province" label="MD-9" width="120" /> <el-table-column prop="md1" label="MD-9" width="120" />
<el-table-column prop="province" label="MD-10" width="120" /> <el-table-column prop="md1" label="MD-10" width="120" />
<el-table-column prop="province" label="MD-11" width="120" /> <el-table-column prop="md1" label="MD-11" width="120" />
<el-table-column prop="province" label="MD-12" width="120" /> <el-table-column prop="md1" label="MD-12" width="120" />
<el-table-column prop="province" label="MD-13" width="120" /> <el-table-column prop="md1" label="MD-13" width="120" />
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -107,65 +107,95 @@ export default {
tableTitleStyle: 'text-align: center; height: 28px; padding: 0;background: #45607B;', tableTitleStyle: 'text-align: center; height: 28px; padding: 0;background: #45607B;',
rowStyle: 'text-align: center;height: 28px; padding: 0; background: #45607B;', rowStyle: 'text-align: center;height: 28px; padding: 0; background: #45607B;',
tableData: [{ tableData: [{
date: '2016-05-03', code: '101',
name: '王小虎', faf1: '打开',
province: '上海', faf2: '打开',
city: '普陀区', ahu1: '打开',
zip: 200333 ahu2: '打开',
raf1: '打开',
raf2: '打开',
md1: '关闭'
}, { }, {
date: '2016-05-02', code: '102',
name: '王小虎', faf1: '打开',
province: '上海', faf2: '打开',
city: '普陀区', ahu1: '打开',
zip: 200333 ahu2: '打开',
raf1: '打开',
raf2: '打开',
md1: '打开'
}, { }, {
date: '2016-05-04', code: '103',
name: '王小虎', faf1: '打开',
province: '上海', faf2: '打开',
city: '普陀区', ahu1: '打开',
zip: 200333 ahu2: '打开',
raf1: '打开',
raf2: '打开',
md1: '关闭'
}, { }, {
date: '2016-05-01', code: '104',
name: '王小虎', faf1: '打开',
province: '上海', faf2: '关闭',
city: '普陀区', ahu1: '打开',
zip: 200333 ahu2: '打开',
raf1: '打开',
raf2: '打开',
md1: '打开'
}, { }, {
date: '2016-05-08', code: '105',
name: '王小虎', faf1: '打开',
province: '上海', faf2: '打开',
city: '普陀区', ahu1: '打开',
zip: 200333 ahu2: '打开',
raf1: '打开',
raf2: '打开',
md1: '关闭'
}, { }, {
date: '2016-05-06', code: '106',
name: '王小虎', faf1: '打开',
province: '上海', faf2: '关闭',
city: '普陀区', ahu1: '打开',
zip: 200333 ahu2: '打开',
raf1: '打开',
raf2: '打开',
md1: '打开'
}, { }, {
date: '2016-05-07', code: '107',
name: '王小虎', faf1: '打开',
province: '上海', faf2: '打开',
city: '普陀区', ahu1: '打开',
zip: 200333 ahu2: '打开',
raf1: '打开',
raf2: '打开',
md1: '打开'
}, { }, {
date: '2016-05-07', code: '108',
name: '王小虎', faf1: '打开',
province: '上海', faf2: '关闭',
city: '普陀区', ahu1: '打开',
zip: 200333 ahu2: '打开',
raf1: '打开',
raf2: '打开',
md1: '打开'
}, { }, {
date: '2016-05-07', code: '',
name: '王小虎', faf1: '打开',
province: '上海', faf2: '打开',
city: '普陀区', ahu1: '打开',
zip: 200333 ahu2: '打开',
raf1: '打开',
raf2: '打开',
md1: '打开'
}, { }, {
date: '', code: '',
name: '', faf1: '打开',
province: '', faf2: '打开',
city: '', ahu1: '打开',
zip: '' ahu2: '打开',
raf1: '打开',
raf2: '打开',
md1: '打开'
}] }]
}; };
}, },

View File

@ -1,6 +1,7 @@
<template> <template>
<div> <div>
<div style="position: absolute; left: 48%; top: 15%;font-size: 20px;color: #9EEBEF;">语音广播</div> <div style="margin: 20px auto 0;text-align: center;font-size: 20px;color: #9EEBEF;">语音广播</div>
<div style="overflow: hidden;">
<div class="area-selection"> <div class="area-selection">
<el-row><div style="margin-top: 10px;margin-bottom: 5px; color: #9EEBEF;">特定区域</div></el-row> <el-row><div style="margin-top: 10px;margin-bottom: 5px; color: #9EEBEF;">特定区域</div></el-row>
<el-row><div class="area-selection-button" @click="selectedAll">全线</div></el-row> <el-row><div class="area-selection-button" @click="selectedAll">全线</div></el-row>
@ -12,10 +13,13 @@
<el-row><div class="area-selection-button" @click="selectedBatch('换乘通道')">全换乘通道</div></el-row> <el-row><div class="area-selection-button" @click="selectedBatch('换乘通道')">全换乘通道</div></el-row>
</div> </div>
<div class="broadcast-form"> <div class="broadcast-form">
<div :key="i" v-for="(item,i) in verticalHeader" :style="{width: tableWidth+'px'}" class="iscs-pa-table"> <div style="width: 120px; height: 300px; float: left; position: absolute; top: 20px;">
<div class="left-header">{{ item.name }}</div> <div v-for="(item,i) in verticalHeader" :key="i" :style="{top: i * 31.5 +'px'}" class="left-header">{{ item.name }}</div>
<div style="position: relative; left: 5%;"> </div>
<div :key="j" v-for="(it, j) in stationList" class="table-grid"> <div style="float: left; overflow-x: auto; width: 100%; height: 314px;">
<div v-for="(item,i) in verticalHeader" :key="i" :style="{width: tableWidth+'px'}" class="iscs-pa-table">
<div style="position: relative; left: 80px;">
<div v-for="(it, j) in stationList" :key="j" class="table-grid">
<div v-if="item.type==='header'" class="pa-table-header" @click="selectedStation(it)"> <div v-if="item.type==='header'" class="pa-table-header" @click="selectedStation(it)">
<div style="cursor: default;">{{ it }}</div> <div style="cursor: default;">{{ it }}</div>
</div> </div>
@ -29,6 +33,8 @@
</div> </div>
</div> </div>
</div> </div>
</div>
<div style="float: right; width: 11%; margin-right: 1%;margin-top: 63px;">
<div class="broadcast-mode"> <div class="broadcast-mode">
<el-row> <el-row>
<el-col :span="12"><div style="height: 40px;text-align: center; background: #000088;color: #fff;line-height: 40px">实时广播</div></el-col> <el-col :span="12"><div style="height: 40px;text-align: center; background: #000088;color: #fff;line-height: 40px">实时广播</div></el-col>
@ -68,15 +74,20 @@
<el-col :span="12"><div class="broadcast-mode-button">停止音乐</div></el-col> <el-col :span="12"><div class="broadcast-mode-button">停止音乐</div></el-col>
</el-row> </el-row>
</div> </div>
</div>
</div>
<div>
<div class="pa-grey-box" /> <div class="pa-grey-box" />
<div class="pa-statements"> <div class="pa-statements">
<state-table /> <state-table />
</div> </div>
</div>
<voice-broadcast ref="voiceBroadcast" /> <voice-broadcast ref="voiceBroadcast" />
</div> </div>
</template> </template>
<script> <script>
import { getByGroupStationList } from '@/api/jmap/map';
import MusicIcon from '@/assets/iscs_icon/music_icon.png'; import MusicIcon from '@/assets/iscs_icon/music_icon.png';
import StateTable from './stateTable'; import StateTable from './stateTable';
import VoiceBroadcast from './voiceBroadcast'; import VoiceBroadcast from './voiceBroadcast';
@ -100,7 +111,7 @@ export default {
], ],
musicIcon: MusicIcon, musicIcon: MusicIcon,
selectedAreaList: [], selectedAreaList: [],
stationList: ['会展中心站', '世纪大道站', '交通大学站', '市图书馆站', '中心医院站', '未来路站', '火车站', '人民广场站', '体育中心站'], stationList: [],
videoMode: 'common' videoMode: 'common'
}; };
}, },
@ -109,6 +120,18 @@ export default {
return this.stationList.length * 120 + 80; return this.stationList.length * 120 + 80;
} }
}, },
async created () {
// 线
const res = await getByGroupStationList(this.$route.query.group);
if (res.code == 200) {
this.stationList = [];
res.data.forEach(station => {
if (!station.depot) {
this.stationList.push(station.name);
}
});
}
},
methods: { methods: {
clickArea(i, j) { clickArea(i, j) {
if (this.selectedAreaList.includes(i + '-' + j)) { if (this.selectedAreaList.includes(i + '-' + j)) {
@ -210,9 +233,9 @@ export default {
border-right: 3px solid #fff; border-right: 3px solid #fff;
border-bottom: 3px solid #fff; border-bottom: 3px solid #fff;
width: 5%; width: 5%;
position: absolute; float: left;
top: 200px; margin-top: 63px;
left: 1%; margin-left: 1%;
} }
.area-selection-button{ .area-selection-button{
width: 90%; width: 90%;
@ -242,12 +265,13 @@ export default {
border-right: 3px solid #fff; border-right: 3px solid #fff;
border-bottom: 3px solid #fff; border-bottom: 3px solid #fff;
width: 80%; width: 80%;
height: 40%; height: 340px;
top: 200px; margin-left: 10px;
position: absolute; float: left;
left: 7%; margin-top: 63px;
overflow-x: auto; overflow-x: auto;
padding-top: 20px; padding-top: 20px;
position: relative;
} }
.table-grid{ .table-grid{
width: 120px; width: 120px;
@ -258,14 +282,15 @@ export default {
} }
.left-header{ .left-header{
width: 120px; width: 120px;
height: 30px; height: 32px;
display: inline-block; display: inline-block;
padding-left: 20px; padding-left: 20px;
font-size: 14px; font-size: 14px;
text-align: left; text-align: left;
color: #A2E8EB; color: #A2E8EB;
position:fixed; position: absolute;
left: 7.15%; top: 0;
left: 0;
background: #45607B; background: #45607B;
z-index: 10; z-index: 10;
} }
@ -309,11 +334,12 @@ export default {
border-bottom: 2px solid #898888; border-bottom: 2px solid #898888;
} }
.pa-grey-box{ .pa-grey-box{
position: absolute; float: left;
left: 4%; margin-left: 5%;
top: 64%; margin-top: 10px;
width: 81%; top: 500px;
height: 30%; width: 78%;
height: 240px;
background: #DDDDDD; background: #DDDDDD;
border-top: 3px solid #898888; border-top: 3px solid #898888;
border-left: 3px solid #898888; border-left: 3px solid #898888;
@ -321,24 +347,21 @@ export default {
border-bottom: 3px solid #fff; border-bottom: 3px solid #fff;
} }
.pa-statements{ .pa-statements{
position: absolute; float: right;
left: 86%; margin-right: 1%;
top: 64%; margin-top: 50px;
width: 13%; width: 15%;
height: 30%; height: 30%;
font-size: 12px; font-size: 12px;
color: #fff; color: #fff;
} }
.broadcast-mode{ .broadcast-mode{
position: absolute;
left: 88%;
top: 25%;
border-top: 3px solid #898888; border-top: 3px solid #898888;
border-left: 3px solid #898888; border-left: 3px solid #898888;
border-right: 3px solid #fff; border-right: 3px solid #fff;
border-bottom: 3px solid #fff; border-bottom: 3px solid #fff;
width: 11%;
font-size: 12px; font-size: 12px;
margin-bottom: 13px;
} }
.broadcast-mode-button{ .broadcast-mode-button{
height: 30px; height: 30px;
@ -364,16 +387,13 @@ export default {
} }
} }
.broadcast-operations{ .broadcast-operations{
position: absolute;
left: 88%;
top: 32%;
border-top: 3px solid #898888; border-top: 3px solid #898888;
border-left: 3px solid #898888; border-left: 3px solid #898888;
border-right: 3px solid #fff; border-right: 3px solid #fff;
border-bottom: 3px solid #fff; border-bottom: 3px solid #fff;
width: 11%;
font-size: 12px; font-size: 12px;
background: #778899; background: #778899;
margin-bottom: 13px;
} }
.pa-check-box{ .pa-check-box{
position: relative; position: relative;
@ -388,14 +408,10 @@ export default {
border-bottom: 2px solid #fff; border-bottom: 2px solid #fff;
} }
.background-music{ .background-music{
position: absolute;
left: 88%;
top: 48%;
border-top: 3px solid #898888; border-top: 3px solid #898888;
border-left: 3px solid #898888; border-left: 3px solid #898888;
border-right: 3px solid #fff; border-right: 3px solid #fff;
border-bottom: 3px solid #fff; border-bottom: 3px solid #fff;
width: 11%;
font-size: 12px; font-size: 12px;
background: #778899; background: #778899;
} }

View File

@ -1,5 +1,5 @@
<template> <template>
<div> <div style="height: 100%; overflow-y: auto;">
<center-home v-if="currentSystem === 'center'" /> <center-home v-if="currentSystem === 'center'" />
<station-home v-else-if="currentSystem === 'local'" /> <station-home v-else-if="currentSystem === 'local'" />
</div> </div>

View File

@ -11,7 +11,7 @@
<emergency-release v-else-if="mode === 'EmergencyRelease'" /> <emergency-release v-else-if="mode === 'EmergencyRelease'" />
<controlBAS v-else-if="mode === 'controlBAS'" /> <controlBAS v-else-if="mode === 'controlBAS'" />
<controlPermissionBAS v-else-if="mode === 'controlPermissionBAS'" /> <controlPermissionBAS v-else-if="mode === 'controlPermissionBAS'" />
<mainScreenPA v-else-if="mode === 'mainScreenPA'" /> <!-- <mainScreenPA v-else-if="mode === 'mainScreenPA'" /> -->
<radioListeningPA v-else-if="mode === 'radioListeningPA'" /> <radioListeningPA v-else-if="mode === 'radioListeningPA'" />
<timePreviewPA v-else-if="mode === 'timePreviewPA'" /> <timePreviewPA v-else-if="mode === 'timePreviewPA'" />
<controlCCTV v-else-if="mode === 'controlCCTV'" /> <controlCCTV v-else-if="mode === 'controlCCTV'" />
@ -39,7 +39,7 @@ import StationNetwork from './pis/stationNetwork';
import EmergencyRelease from './pis/emergencyRelease'; import EmergencyRelease from './pis/emergencyRelease';
import controlBAS from './bas/controlBAS'; import controlBAS from './bas/controlBAS';
import controlPermissionBAS from './bas/controlPermissionBAS'; import controlPermissionBAS from './bas/controlPermissionBAS';
import mainScreenPA from './pa/mainScreenPA'; // import mainScreenPA from './pa/mainScreenPA';
import radioListeningPA from './pa/radioListeningPA'; import radioListeningPA from './pa/radioListeningPA';
import timePreviewPA from './pa/timePreviewPA'; import timePreviewPA from './pa/timePreviewPA';
import controlCCTV from './cctv/controlCCTV'; import controlCCTV from './cctv/controlCCTV';
@ -66,7 +66,7 @@ export default {
EmergencyRelease, EmergencyRelease,
controlBAS, controlBAS,
controlPermissionBAS, controlPermissionBAS,
mainScreenPA, // mainScreenPA,
radioListeningPA, radioListeningPA,
timePreviewPA, timePreviewPA,
controlCCTV, controlCCTV,

View File

@ -84,6 +84,7 @@
</div> </div>
</template> </template>
<script> <script>
import { getByGroupStationList } from '@/api/jmap/map';
import InfoBroadcast from './infoBroadcast'; import InfoBroadcast from './infoBroadcast';
export default { export default {
name:'MainScreen', name:'MainScreen',
@ -92,92 +93,31 @@ export default {
}, },
data() { data() {
return { return {
stationList:[ stationList:[],
{
stationName:'会展中心站',
children:[
{status:'none'}, {status:'default'},
{status:'default'}, {status:'default'},
{status:'none'}, {status:'none'},
{status:'none'}, {status:'default'}
]
},
{
stationName:'世纪大道站',
children:[
{status:'none'}, {status:'default'},
{status:'default'}, {status:'default'},
{status:'none'}, {status:'none'},
{status:'none'}, {status:'default'}
]
},
{
stationName:'交通大学站',
children:[
{status:'none'}, {status:'default'},
{status:'default'}, {status:'default'},
{status:'none'}, {status:'none'},
{status:'none'}, {status:'default'}
]
},
{
stationName:'市图书馆站',
children:[
{status:'none'}, {status:'default'},
{status:'default'}, {status:'default'},
{status:'none'}, {status:'none'},
{status:'none'}, {status:'default'}
]
},
{
stationName:'中心医院站',
children:[
{status:'none'}, {status:'default'},
{status:'default'}, {status:'default'},
{status:'none'}, {status:'none'},
{status:'none'}, {status:'default'}
]
},
{
stationName:'未来路站',
children:[
{status:'none'}, {status:'default'},
{status:'default'}, {status:'default'},
{status:'none'}, {status:'none'},
{status:'none'}, {status:'default'}
]
},
{
stationName:'火车站',
children:[
{status:'none'}, {status:'default'},
{status:'default'}, {status:'default'},
{status:'none'}, {status:'none'},
{status:'none'}, {status:'default'}
]
},
{
stationName:'人民广场站',
children:[
{status:'none'}, {status:'default'},
{status:'default'}, {status:'default'},
{status:'none'}, {status:'none'},
{status:'none'}, {status:'default'}
]
},
{
stationName:'体育中心站',
children:[
{status:'none'}, {status:'default'},
{status:'default'}, {status:'default'},
{status:'none'}, {status:'none'},
{status:'none'}, {status:'default'}
]
}
],
selectedAreaList: [] selectedAreaList: []
}; };
}, },
async created () {
// 线
const res = await getByGroupStationList(this.$route.query.group);
if (res.code == 200) {
this.stationList = [];
res.data.forEach(station => {
if (!station.depot) {
const param = {
stationName: station.name,
children:[
{status:'none'}, {status:'default'},
{status:'default'}, {status:'default'},
{status:'none'}, {status:'none'},
{status:'none'}, {status:'default'}
]
};
this.stationList.push(param);
}
});
}
},
methods:{ methods:{
showInfoBrroadcast() { showInfoBrroadcast() {
this.$refs.infoBroadcast.doShow(); this.$refs.infoBroadcast.doShow();
@ -318,7 +258,7 @@ border-top: 2px solid #8c8a89;border-left: 2px solid #8c8a89;border-right: 2px s
vertical-align: top; vertical-align: top;
} }
.screen_status_active::after{content:'';border-top: 2px solid #a6a2a6;border-left: 2px solid #a5aca5;border-right: 2px solid #ececec;border-bottom: 2px solid #e4e4e4;background: #00ff00;min-width: 10px;height: 10px;display: inline-block;vertical-align: top;} .screen_status_active::after{content:'';border-top: 2px solid #a6a2a6;border-left: 2px solid #a5aca5;border-right: 2px solid #ececec;border-bottom: 2px solid #e4e4e4;background: #00ff00;min-width: 10px;height: 10px;display: inline-block;vertical-align: top;}
.screen_left_text_group{width:180px;padding: 0px 10px 10px 10px;font-size: 14px;color: #9de4e8;display: inline-block;} .screen_left_text_group{width:210px;padding: 0px 10px 10px 10px;font-size: 14px;color: #9de4e8;display: inline-block;}
.each_data_info{margin-top:10px;height:20px;} .each_data_info{margin-top:10px;height:20px;}
.screen_right_group{display: inline-block;vertical-align: top;font-size:0;overflow-x: auto;min-height:100%;} .screen_right_group{display: inline-block;vertical-align: top;font-size:0;overflow-x: auto;min-height:100%;}
.each_station_info{width:130px;display: inline-block;vertical-align:top;padding-right: 10px;} .each_station_info{width:130px;display: inline-block;vertical-align:top;padding-right: 10px;}

View File

@ -53,6 +53,15 @@ export default {
return { return {
activeName: 'first', activeName: 'first',
autoList: [], autoList: [],
atsControlList: [],
centerCommunicationList: [],
chainControlList: [],
intersiteControlList: [],
leuControlList: [],
localControlList: [],
maintainList: [],
powerSupplyList: [],
noOneReturnList: [],
typeList: [ typeList: [
{ name: 'LEU通信', value: 'LeuControl' }, { name: 'LEU通信', value: 'LeuControl' },
{ name: '站间通信', value: 'IntersiteControl' }, { name: '站间通信', value: 'IntersiteControl' },
@ -96,6 +105,9 @@ export default {
], ],
'position.y': [ 'position.y': [
{ required: true, message: this.$t('rules.trainPositionY'), trigger: 'blur' } { required: true, message: this.$t('rules.trainPositionY'), trigger: 'blur' }
],
stationCode: [
{ required: true, message: '请选择设备集中站', trigger: 'change'}
] ]
} }
}; };
@ -103,15 +115,7 @@ export default {
computed: { computed: {
...mapGetters('map', [ ...mapGetters('map', [
'stationList', 'stationList',
'atsControlList', 'indicatorLightList'
'centerCommunicationList',
'chainControlList',
'intersiteControlList',
'leuControlList',
'localControlList',
'maintainList',
'powerSupplyList',
'noOneReturnList'
]), ]),
form() { form() {
const form = { const form = {
@ -124,7 +128,7 @@ export default {
draw: { draw: {
name: this.$t('map.drawData'), name: this.$t('map.drawData'),
item: [ item: [
{ prop:'type', label: '表示灯类型:', type: 'select', optionLabel: 'name', optionValue: 'value', options: this.typeList, disabled: true }, { prop:'type', label: '表示灯类型:', type: 'select', optionLabel: 'name', optionValue: 'value', options: this.typeList, change: true, deviceChange: this.typeChange },
{ prop: 'code', label: `${this.$t('map.code')}`, type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.selectLists, change: true, deviceChange: this.deviceChange }, { prop: 'code', label: `${this.$t('map.code')}`, type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.selectLists, change: true, deviceChange: this.deviceChange },
{ prop: 'name', label: '表示灯名称:', type: 'input' }, { prop: 'name', label: '表示灯名称:', type: 'input' },
{ prop: 'position', label: '坐标:', type: 'coordinate', width: '140px', children: [ { prop: 'position', label: '坐标:', type: 'coordinate', width: '140px', children: [
@ -166,6 +170,9 @@ export default {
], ],
'position.y': [ 'position.y': [
{ required: true, message: this.$t('rules.trainPositionY'), trigger: 'blur' } { required: true, message: this.$t('rules.trainPositionY'), trigger: 'blur' }
],
stationCode: [
{ required: true, message: '请选择设备集中站', trigger: 'change'}
] ]
}; };
} }
@ -173,17 +180,64 @@ export default {
watch: { watch: {
selected(val, oldVal) { selected(val, oldVal) {
this.deviceSelect(val); this.deviceSelect(val);
},
indicatorLightList(val) {
this.handleIndicatorLightList(val);
} }
}, },
mounted() { mounted() {
this.handleIndicatorLightList(this.indicatorLightList);
}, },
methods: { methods: {
typeChange(type) { typeChange(type) {
this.$refs.dataform.resetFields(); this.$refs.dataform.resetFields();
this.$refs.make.resetFields(); this.$refs.make.resetFields();
this.addModel.type = type; this.addModel.type = type;
this.editModel.type = type;
this.handleTypes(type); this.handleTypes(type);
}, },
handleIndicatorLightList(indicatorLightList) {
this.atsControlList = [];
this.centerCommunicationList = [];
this.chainControlList = [];
this.intersiteControlList = [];
this.leuControlList = [];
this.localControlList = [];
this.maintainList = [];
this.powerSupplyList = [];
this.noOneReturnList = [];
indicatorLightList.forEach(item => {
switch (item._type) {
case 'AtsControl':
this.atsControlList.push(item);
break;
case 'CenterCommunication':
this.centerCommunicationList.push(item);
break;
case 'ChainControl':
this.chainControlList.push(item);
break;
case 'IntersiteControl':
this.intersiteControlList.push(item);
break;
case 'LeuControl':
this.leuControlList.push(item);
break;
case 'LocalControl':
this.localControlList.push(item);
break;
case 'Maintain':
this.maintainList.push(item);
break;
case 'PowerSupply':
this.powerSupplyList.push(item);
break;
case 'NoOneReturn':
this.noOneReturnList.push(item);
break;
}
});
},
handleTypes(type) { handleTypes(type) {
switch (type) { switch (type) {
case 'AtsControl': case 'AtsControl':
@ -214,6 +268,7 @@ export default {
this.selectLists = this.noOneReturnList; this.selectLists = this.noOneReturnList;
break; break;
} }
console.log(this.selectLists, '===============');
}, },
changeStation(code) { // changeStation(code) { //
this.autoList.forEach(elem => { this.autoList.forEach(elem => {
@ -253,6 +308,7 @@ export default {
const models = []; const models = [];
const model = { const model = {
_type: this.addModel.type, _type: this.addModel.type,
type: this.addModel.type,
code: uid, code: uid,
name: this.addModel.name, name: this.addModel.name,
position: { position: {